This is a migrated thread and some comments may be shown as answers.

Cascade DropDownList with JSON String

1 Answer 220 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Sean
Top achievements
Rank 1
Sean asked on 14 Nov 2013, 05:17 PM
To better explain what I'm looking to do I adapted a sample from the cascading dropdownlists. View JSFiddle example  The issue is with the data format...

Work flow is that we have selected a town. Then all the streets in that town are populated in DDL. Once street is selected, then all the street numbers on that selected street are populated in the last DDL.

Note: The mock data is a sample of the real data with much less. Code from the existing REST endpoint creation can be viewed in here: REST C# endpoint

What tweaks do I need to make to take advantage of this perfect example for a cascading dropdownlist?

Thanks in advance!

1 Answer, 1 is accepted

Sort by
0
Alexander Valchev
Telerik team
answered on 18 Nov 2013, 09:34 AM
Hi Todd,

As discussed in other support threads that you opened, the response which you return is not valid. Please check the controller code from our GitHub sample projects to see how to send a valid JSON in response of an Ajax call or search Google for a relevant tutorial.

Once you return a correct data, your jsFiddle sample will work. To make it work without modifying the controller (although that I highly recommend you to configure the controller correctly) you can parse the string data at the requestEnd event of the DataSource.

Here is a link to the updated sample: http://jsfiddle.net/yULnu/11/

Regards,
Alexander Valchev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
DropDownList
Asked by
Sean
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Share this question
or