Hi All, I am using ajax atlas tool kit in my project.Is it possible to share a parent cascading drop down with two child cascading dropdown list??if any one has come across such logic or have any idea regarding this, pls help me.Thanks in advance
Hi Palavesh,
Of course. You can do it like this.
State:<asp:DropDownList runat="server" ID="dlState">
</asp:DropDownList>
City:
<asp:DropDownList runat="server" ID="dlCity" >
</asp:DropDownList>
District:
<asp:DropDownList runat="server" ID="dlDistrict">
</asp:DropDownList>
<cc1:CascadingDropDown ID="CascadingDropDown1" BehaviorID="myCDEState" runat="server" TargetControlID="dlState"
Category="State" ServicePath="../WebService/CityServiceOledb.asmx" ServiceMethod="GetStates" LoadingText="[Loading...]" PromptText="Please select state">
</cc1:CascadingDropDown>
<cc1:CascadingDropDown ID="CascadingDropDown2" BehaviorID="myCDECity" runat="server"TargetControlID="dlCity" ParentControlID="dlState"
Category="City"PromptText="Select a city" ServicePath="../WebService/CityServiceOledb.asmx"
ServiceMethod="GetCities" LoadingText="Load cities..." >
</cc1:CascadingDropDown>
<cc1:CascadingDropDown ID="CascadingDropDown3" BehaviorID="myCDDistrict" runat="server"TargetControlID="dlDistrict" ParentControlID="dlState"
Category="District" PromptText="Select a district" ServicePath="../WebService/CityServiceOledb.asmx"
ServiceMethod="GetDistricts" LoadingText="Load districts..." >
</cc1:CascadingDropDown>
I hope this help.
Best regards,
Jonathan
Hi Jonathan,
Thank you.. I hope this will solve my issue.
Regards,
Palavesh.
Hi Palavesh,
You are welcome.
If it doesn't work , please feel free to let me know.
Best regards,
Jonathan
Hi jonathan,
i have below piece of code in my project.
i need source and locality from the city selected ,
initially it works fine during the the selection of city,
after i submit the form (during postback) locality dropdown is not populated,
can you pls give me your suggestion
thanks in advance
<%@. Register Assembly="AtlasControlToolkit" Namespace="AtlasControlToolkit" TagPrefix="cc1" %>
<asp:DropDownList ID="Dlstate" runat="server" />
<asp:DropDownList ID="DlCity" runat="server">
</asp:DropDownList>
<cc1:CascadingDropDown ID="cascadingstatezonecity" runat="server">
<cc1:CascadingDropDownProperties Category="StateName" ParentControlID="Dlstate"
TargetControlID="DlCity" PromptText="Select City" ServiceMethod="Pros_GetCityByStateID"
ServicePath="venusStateLocality.asmx" />
</cc1:CascadingDropDown>
<asp:DropDownList ID="DlLocality" runat="server" />
<cc1:CascadingDropDown ID="cascadingstatezonelocality" runat="server">
<cc1:CascadingDropDownProperties Category="CityName" ParentControlID="DlCity"
TargetControlID="DlLocality" PromptText="Select Locality" ServiceMethod="Pros_GetLocalityByCityID"
ServicePath="venusStateLocality.asmx" />
</cc1:CascadingDropDown>
<asp:DropDownList ID="DlSource" runat="server">
</asp:DropDownList>
<cc1:CascadingDropDown ID="cascadingstatesource" runat="server">
<cc1:CascadingDropDownProperties Category="CityName" ParentControlID="DlCity"
TargetControlID="DlSource" PromptText="Select Source" ServiceMethod="Pros_GetSourceByCityID"
ServicePath="venusStateLocality.asmx" />
</cc1:CascadingDropDown>
Hi Palavesh,
You have four CascadingDropDowns on the page, I suggest that you should add a CascadingDropDown for Dlstate. To debug it , please reference to thisthread.
Best regards,
Jonathan