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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to render cascading dropdown while editing?

In certain cases, changing the dataSource of one dropdown on selecting a value from other dropdown is known as the cascading effect. This effect can be applied to two dropdown controls within Grid upon editing that is explained in detail in this document.

Solution

The following example explains in detail on how to achieve the cascading effect in Grid for two ForeignKey columns that refreshes the dataSource of one dropdown based on the value selected in another dropdown.

Example

  1. Render the Grid control.

HTML:

 

Javascript:

 

C#

 

 

 

MVC

RAZOR:

 

C#

 

ASP.NET

 

C#

ASP.NET CORE

HTML

C#

ANGULAR

HTML

TS

 

2. In the ActionComplete events of the Grid, the ValChange function is bound to the Change event of the ejDropDownList. The selected value of the Designation dropdown is passed to the server side on the Ajax call, getting the filtered data from the server side and assigning it to the Country dropdown’s dataSource.

  1. In the change event of the Designation dropdown, the selected value of the Designation dropdown is passed to the server side on the Ajax call, getting the filtered data from the server side and assigning it to the Country dropdown’s dataSource.

Result:

Figure 1Initial rendering of grid

 

 

Figure 2On editing a record

 

Figure 3On changing the value of designation column

Article ID: Published Date: Last Revised Date: Platform: Control:
5445 09/22/2015 10/01/2018 ASP.NET MVC Grid
Did you find this information helpful?
Comments
Anna Feb 05, 2016
Hi, how can I make this, drop down with autocomplete
Reply
Ragavee U S [Syncfusion] Feb 09, 2016
@anna: By enabling the showPopupButton property in the ejAutocomplete control, the autocomplete textbox acts like dropdown list with the predictive suggestion list. You can refer our api document for more information. http://help.syncfusion.com/js/api/ejautocomplete#members:showpopupbutton
Reply
Laura Jordan Apr 05, 2018
Hi,

I need the same behaviour in my grid but I can´t obtain the refresh in the dependent dropdown when changing the firts one :-( 
I don´t know what I missing, can you send me the .rar example please?

Really appreciate the support,
Thanks
Reply
Vignesh Natarajan [Syncfusion] Apr 10, 2018

Hi Laura, 

We have prepared a sample based on the knowledge base document. We are not able to reproduce the reported issue. The sample can be download from below link 

Sample: http://www.syncfusion.com/downloads/support/directtrac/general/ze/SyncfusionMvcApplication40-1317059239.zip 


Kindly share the following details to reproduce the reported issue at our end.


1.       Share the full grid rendering code

2.       Share the screenshot for the script error in console window.

3.       Essential studio version (XX.X.X.XX)

4.       If possible try to reproduce the reported issue in provided sample

 

Regards,

Vignesh Natarajan

Reply
Add Comment
You must log in to leave a comment

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon