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

Local data source from string

0 Answers 122 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Cliff
Top achievements
Rank 1
Cliff asked on 20 Dec 2011, 04:24 PM
Whilst using the drop down list if I assign the data like the first example it works OK, however if I build up a string and then put this in as per the second example it does not work as expected.

***first statement******

 

$("#dropdownlist").kendoDropDownList([{ text: 'Zone 1', value: '0' }, { text: 'Zone 2', value: '10000' }, { text: 'Zone 3', value: '10001'}]);

 

***second statement******

var json = "{ text: 'Zone 1', value: '0' }, { text: 'Zone 2', value: '10000' }, { text: 'Zone 3', value: '10001' }";
$("#dropdownlist").kendoDropDownList([json]);

 

No answers yet. Maybe you can help?

Tags
DropDownList
Asked by
Cliff
Top achievements
Rank 1
Share this question
or