jquery - DropDown in Kendo UI Grid showing Object-Object after selecting option from drop down list -


i using kendo grid in application. in grid, have used kendo drop down list. have array datasource of dropdownlist. array looks like

var arr = [{text: "demo 1", value: 1}, {text: "demo 2", value: 2}] 

my dropdownlist looks like:

    $("#grid").kendogrid({         datasource: datasource,         navigatable: true,         pageable: true,         height: 550,         filterable: {             mode: "row"         },         sortable: {             mode: "single",             allowunsort: false         },         toolbar: ["create"],         columns: [             { field: "item", title: "item", width: "300px", editor: categorydropdowneditor }         ],         editable: true     });      function categorydropdowneditor(container, options) {         $('<input data-text-field="text" data-value-field="value" data-bind="value:' + options.field + '" />')             .appendto(container)             .kendodropdownlist({                 datasource: arr,                 autobind: true,                 datatextfield: "text",                 datavaluefield: "value",             });     } 

it showing text in dropdown correctly after selecting option drop down shows object object selected text.

attached screenshot of drop down selected value , after option after selecting image of option selecting , after option selected

i have tried lot of solutions didn't work. great if provides solution.

thanks

try removing data-text-field , data-value-field on categorydropdowneditor.

made jsfiddle you. check one.


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -