I have the following code for a Kendo Drop Downlist which binds to a REST end point
ddChange.kendoDropDownList({
dataSource: {
transport: {
read: {
url: "http://localhost/Project/MyMethod",
dataType: "json"
},
parameterMap: function () {
return {
source: data.source,
c: data.c,
ch: data.ch,
};
},
schema: {
data: function (response) {
return $.parseJSON(response);
}
}
}
},
dataTextField: "name",
dataValueField: "id",
change: ddChange
});
Everything is seemingly working, except the end part. The call to http://localhost/Project/MyMethod?source=1&c=2&ch=3 is occuring, I can see it happening and returning correct data, however, the return $.parseJSON(response); from schema > data is not so my drop down just contains many undefined entries because I am left with a string that still needs to be parsed to an array.
Doing this works for the Kendo Grid, should it work for the drop down list? Am I missing something?
Schema isn´t part of the transport object but a property of the datasource.
Can you try this?
Or if your only doing that on the schema you could just omit it.