We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Cacading ejdropdownlist...

Hello,

I'm trying to implement cascading dropdownlist like the asp.net webforms example: http://asp.syncfusion.com/demos/web/dropdownlist/cascading.aspx. I have tried using CascadeTo and OnValueSelect without success. I tried copying the sample code and placing it in a webform and didn't have any success.  I'm not sure what I'm doing incorrectly.

When using "OnValueSelect" i receive and error "Sys.WebForms.PageRequestManager is undefined ".

When using "CascadeTo",  the "cascade" dropdownlist is not filtered.

I'm using VS 2010 Asp.net 4.0 webforms.

Thanks.

5 Replies

AP Arun Palaniyandi Syncfusion Team November 13, 2015 12:36 PM UTC

Hi Cliff,

Thank you for contacting Syncfusion support

Query1 :” When using "CascadeTo",  the "cascade" dropdownlist is not filtered”.

Based on your shared details we are unable to reproduce the issue when using the code from our online demo. We suspect that the issue may be caused because of the ID set in the CascadeTo property, you have to give the corresponding DropDownList’s ClientID to the CascaseTo property. Please ensure the ID given in your sample.

We have prepared cascading DropDownList sample and it is available below link:
http://www.syncfusion.com/downloads/support/forum/121132/ze/DropDown_f121132-61149103

Query 2: “When using "OnValueSelect" i receive and error "Sys.WebForms.PageRequestManager is undefined ".

We are unable to reproduce this error, so kindly share us the screenshots of the corresponding error and also provide the code snippets on how you have defined OnValueSelect event in your end and where do you use Sys.WebForms.PageRequestManager in your application? Provide us the details requested so that we can provide you an appropriate solution.

Please let me know if you have any questions.

Regards,
Arun P



BL bloatus November 16, 2015 09:25 PM UTC

Arun,

I noticed that the OnValueSelect dropdownlist sample project uses .net 4.5.1 and I'm guessing VS2013. I am using VS2010 .net 4.0.
I copied the html and code from default.aspx and default.aspx.cs files into a .net 4.0 project and couldn't get it to work.  Could you create a VS2010 .net 4.0 project?

Thanks!


ES Ezhil S Syncfusion Team November 17, 2015 06:22 AM UTC

Hi Cliff,

Thanks for your update.

Query 1: Could you create a VS2010 .net 4.0 project?
The sample shared in previous update uses .NET framework version 4.0 and prepared in VS2010 with Essential studio version 13.3.0.12.

Query 2: I noticed that the OnValueSelect dropdownlist sample project uses .net 4.5.1 and I'm guessing VS2013
We are unable to understand your query with OnValueSelect event in the DropDownList sample that uses . NET framework 4.5.1. Since we have shared sample in VS2010 and . NET framework 4.0, which sample did you mention in here that uses 4.5.1 framework. Could you please share the details requested previously regarding the OnValueSelect error? So that we could analyze further and provide a solution.

Regards,
Ezhil S


BL bloatus December 3, 2015 04:33 PM UTC

I got this working. The dropdownlist was nested in a tab so below is the change to make it work:

I had this:
CascadeTo="MainContent_UserTabs_ddlSubCategory"

and added the text in red (ct100) to this:
CascadeTo="MainContent_UserTabs_ctl00_ddlSubCategory"

Thanks for your support.




VR Varalakshmi R.S Syncfusion Team December 7, 2015 04:32 AM UTC

Hi Cliff,

Thanks for sharing the details with us.

You can also set “ ClientIDMode="Static" ” in the second dropdown and use the id as specified the below code,


<code>

[ASPX]

<div class="control" style="float: left;">

            <span class="txt">Select Group</span>

            <ej:DropDownList ID="groupsList" runat="server" DataTextField="text" DataValueField="parentId" CascadeTo="countryList"

                ClientSideOnChange="onChange">

            </ej:DropDownList>

        </div>

        <div class="control" style="float: right;">

            <span class="txt">Select Country</span>

            <ej:Tab ID="UserTabs" runat="server">

                <Items>

                    <ej:TabItem ID="item1" runat="server">

                        <ContentSection>

                            <ej:DropDownList ID="countryList" runat="server" Enabled="false" ClientIDMode="Static">

                            </ej:DropDownList>

                        </ContentSection>

                    </ej:TabItem>

                </Items>

            </ej:Tab>

        </div>


</code>

Kindly try the solution and let us know if this helps.

Regards,
Varalakshmi


Loader.
Up arrow icon