Sunday, March 11, 2012

2 seperate CDDs on one page

Could you please post a complete sample page that's as simple as you can make it?
Thank you for the reply, here is the page. This only has the dropdownsand cdd's on it. Is it necessary to post my webmethods as well?

<%@. Page Language="VB" EnableEventValidation="false" AutoEventWireup="true" CodeFile="Default.aspx.vb" Inherits="_Default" %>
<%@. Register Assembly="AtlasControlToolkit" Namespace="AtlasControlToolkit" TagPrefix="atlasToolkit" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
<atlas:ScriptManager ID="ScriptManager1" runat="server" />
<div
<p>
Afdeling:<br />
<asp:DropDownList ID="ddlAfdeling" runat="server" Width="205px">
</asp:DropDownList>
</p>
<p>
Locatie: <br />
<asp:DropDownList ID="ddlLocatie" runat="server" Width="205px">
</asp:DropDownList>
</p>
<atlasToolkit:CascadingDropDown ID="cddAfdLoc" runat="server">
<atlasToolkit:CascadingDropDownProperties TargetControlID="ddlAfdeling" Category="afdeling" PromptText="kies" ServicePath="wsTD.asmx" ServiceMethod="GetAfd" />
<atlasToolkit:CascadingDropDownProperties TargetControlID="ddlLocatie" Category="locatie" PromptText="kies" ServicePath="wsTD.asmx" ServiceMethod="GetLocatie" ParentControlID="ddlAfdeling" />
</atlasToolkit:CascadingDropDown>
<p>
Type:<br />
<asp:DropDownList ID="ddlType" runat="server" Width="205px">
</asp:DropDownList>
</p>
<p>
Categorie:<br />
<asp:DropDownList ID="ddlCategorie" runat="server" Width="205px">
</asp:DropDownList>
</p>
<p>
Probleem:<br />
<asp:DropDownList ID="ddlProbleem" runat="server" Width="205px">
</asp:DropDownList>
</p>
<atlasToolkit:CascadingDropDown ID="cddProbleem" runat="server" SuppressValidationScript="false">
<atlasToolkit:CascadingDropDownProperties TargetControlID="ddlType" Category="type" PromptText="kies" ServicePath="wsTD.asmx" ServiceMethod="GetProbTpe" />
<atlasToolkit:CascadingDropDownProperties TargetControlID="ddlCategorie" Category="categorie" PromptText="kies" ServicePath="wsTD.asmx" ServiceMethod="GetCat" ParentControlID="ddlType" />
<atlasToolkit:CascadingDropDownProperties TargetControlID="ddlProbleem" Category="probleem" PromptText="kies" ServicePath="wsTD.asmx" ServiceMethod="GetProb" ParentControlID="ddlCategorie" />
</atlasToolkit:CascadingDropDown>
</div>
</form
</body>
</html>


I found the problem, there was something wrong with my database.
Fixed it and everything's a-ok now.

Greets,
JP
What was wrong? I'm having the same problem. Can you explain what you fixed to your DB to correct the issue?
Well, there wasn't anything wrong per se, the thing that was "wrong"with my database was that it wasn't populated for the first dropdown ofthe second CDD. Which was a pretty big oversight of mine. *hits selfagain*

Make sure your webmethod returns something or the cdd will remaingreyed out. It's odd behaviour i think. If you don't associate awebmethod with it or one with a typo, it'll remain clickable and say"undefined" as your only selection. If you've got the correct webmethodthat doesn't return any values or returns the wrong ones then it'll bedisabled.

Is your page similar to mine with the 2 cdd's? You can always paste theminimum code for your page and maybe the webmethod you use to fill thefirst dropdown that isn't working, i'll try to help where i can

No comments:

Post a Comment