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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

DropDown cascading doesn't work with UrlAdaptor

Thread ID:





129633 Mar 27,2017 07:50 AM UTC Apr 3,2017 04:37 AM UTC ASP.NET MVC 3
Tags: DropDownList
Asked On March 27, 2017 07:50 AM UTC


I bind dropdownlist with Url adaptor, but cascading doesn't work. If I bind with viewbag, it works.

I attach an example

Attachment: DropDownExample_5558f77b.zip

Karthikeyan Viswanathan [Syncfusion]
Replied On March 28, 2017 10:47 AM UTC

Hi Manolo,   
Thanks for contacting Syncfusion support.      
In URL databinding, data request will be raised to server based on the query it will return the data but, assigned viewbag data is a local data. Local data query processed internally and it will be shown in the data for corresponding item. In URL databinding, you should execute the query based on the parent dropdown list selection.   
Please refer to the code snippet:  
@Html.EJ().DropDownList("groupsList2").Datasource(ds => ds.URL(@Url.Content("~") +"Dropdownlist/GetGroupsJson").Adaptor(AdaptorType.UrlAdaptor)).DropDownListFields(f => f.Value("parentId").Text("text")).CascadeTo("countryList2").EnableRTL(false).ClientSideEvents(obj => obj.Cascade("dropcascade"))  
<script type="text/javascript">  
    function dropcascade(args) {  
        args.cascadeQuery = ej.Query().where(args.model.fields.value, "==", args.cascadeValue);  
        public JsonResult GetCountriesJson(Syncfusion.JavaScript.DataManager dm)  
            Syncfusion.JavaScript.DataSources.DataOperations operation = newSyncfusion.JavaScript.DataSources.DataOperations();  
            return Json(operation.Execute(GetCountries(), dm));  
Karthikeyan V. 

Replied On March 31, 2017 11:08 AM UTC


Karthikeyan Viswanathan [Syncfusion]
Replied On April 3, 2017 04:37 AM UTC

Hi Manolo,    
Thanks for the update.  
We are glad the suggestion helped you to achieve your requirement.  
Please let us know if you need further assistance.  
Karthikeyan V. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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