Sunday, March 11, 2012

2nd Cascading DropDown not activating after first box has been selected.

Take a look at your propertys for the second DropDownList, expand the property named Extenders and expand the CascadingDropDown property.
There you have a property named "ParentControlID", make sure that is set to the ID of your first dropdownlist.

IE you have DropDownList1 and DropDownList2, make sure DropDownList2:ParentControlID = DropDownList1.

Tip: make sure your settings is properly set by taking a look at the aspx source, Ive had some problems that changes made in the property window is not beeing reflected in the source.

that goes for ajax control extenders especially.

Mvh
Simon Olsen


Here is the source for the aspx page. The methods seem to work fine as the data is being displayed but the second one just won't activate.

Thanks
Matt

<asp:DropDownList ID="ddParent" runat="server" Style="z-index: 101; left: 405px; position: absolute;
top: 237px" Width="130px" >
</asp:DropDownList
<asp:DropDownList ID="ddChild" runat="server" Style="z-index: 101; left: 405px; position: absolute;
top: 266px" Width="130px">
</asp:DropDownList
<cc1:CascadingDropDown ID="CascadingDropDown2" runat="server" Category="Parent" TargetControlID="ddParent" PromptText="Select Company"
ServiceMethod="GetParentContents" ServicePath="CompanyService.asmx">
</cc1:CascadingDropDown
<cc1:CascadingDropDown ID="CascadingDropDown1" runat="server" Category="Child" LoadingText="[Loading Companies...]"
ServiceMethod="GetChildContents" ServicePath="CompanyService.asmx" TargetControlID="ddChild" ParentControlID="ddParent" PromptText="Select Company">
</cc1:CascadingDropDown>

No comments:

Post a Comment