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

Grid edit template cascading dropdown

Greetings;
I have a situation where I have countries and states/provinces in a grid, and when editing a line in the template If I change the Country selected value, I will need to re populate the State/Province value.
I did find an example in MVC but I am not able to make it work in ASP/javascript.
I have modified one of your example programs to have the situation and the issue, the difference is I used Country and City.
If you could point put my error I would be appreciative.
Thanks
Bruce.

Attachment: Grid_e29e6d66.zip

3 Replies

MS Mani Sankar Durai Syncfusion Team February 4, 2016 12:22 PM UTC

Hi Bruce Stevenson,

We analyzed your sample and found that you have updated the column datasource which is the cause of the issue. We suggest you to update Dropdown Control’s  datasource to resolve the issue.

For clarification please refer the following code example.

  function _Change(args) {


            var gridObj = $('#<%= FlatGrid.ClientID %>').data("ejGrid")

           


            $("#ShipCity").ejDropDownList({ dataSource: gridObj.model.columns[State].dataSource });


           

        }




We have modified the sample that can be downloaded from below location.

http://www.syncfusion.com/downloads/support/forum/121887/ze/editing297894467                                                                                                                                              


Regards,
Manisankar Durai



BS Bruce Stevenson February 4, 2016 07:47 PM UTC

Thanks for the assistance;
I got your solution to work by putting back the $("#ContactsGrid"), from the $("#<%=ContactsGrid.ClientID %>").

after that it worked like a champ.

Thanks

Bruce


MS Mani Sankar Durai Syncfusion Team February 5, 2016 04:20 AM UTC

Hi Bruce Stevenson,
 
We are happy to hear that your issue has been resolved.
Get back to us if you need further assistance.
  

Regards,

Manisankar Durai

Loader.
Up arrow icon