Local data source from string

1 posts, 0 answers
  1. Cliff
    Cliff avatar
    1 posts
    Member since:
    Jul 2008

    Posted 20 Dec 2011 Link to this post

    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]);

     

Back to Top