I have the following dropdown filter for datagrid, after i add data to grid, new category name appears in popup editor, but not in this dropdown, i have to reload to see new value in list :( How to do it in kendo way?
$("#category_list").kendoDropDownList({
dataTextField: "name",
dataValueField: "name",
dataSource: {
transport: {
read: {
url: '/api/notes/cats',
dataType: 'json',
type: 'GET',
},
},
schema: {
data: function(reply) {
return reply.rows
},
},
},
change: function() {
val = $("#category_list").val();
var grid = $("#grid").data().kendoGrid;
grid.dataSource.filter({
"filters":[{"field":"category","operator":"eq","value":val}]
})
},
open: function() {
var kd = $("#category_list").data().kendoDropDownList
kd.dataSource.transport.read();
console.log("reading")
}
})