Click here to Skip to main content
15,887,404 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am using kendo dropdown like
HTML
//html
<input id="field_timezone" style="width: 275px;" tabindex="4">  

JavaScript
//js
resultList = $.parseJSON(response.d);   //data via ajax call

$("#field_timezone").kendoDropDownList({
    dataTextField: "TimeZoneDescription",
    dataValueField: "TimeZoneID",
    dataSource: resultList,
    optionLabel: {
        TimeZoneDescription: "Choose",
        TimeZoneID: ""
    }
});

I am trying to find, what value/text pairs or options should be displayed on the dropdown

Things I have tried
JavaScript
alert(JSON.stringify($('#field_timezone').data('kendoDropDownList').dataSource.data()));
//or
alert(JSON.stringify($('#field_timezone').data('kendoDropDownList').dataSource._data));

gives the list used for datasource, but it's missing the "Choose"option,

And no option to find out which fields are been used for value or text
Posted

1 solution

Telerik has a very hi level of support, you should use it...
As for your question...check this demo...concentrate on the button 'Get value'...
http://demos.telerik.com/kendo-ui/dropdownlist/api[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900