var mainGridDataSource = new kendo.data.DataSource({
type: 'aspnetmvc-ajax',
transport: {
read: {
url: "/test",
contentType: "application/json",
type: "POST"
},
parameterMap: function (options, operation) {
return JSON.stringify(options);
}
}
});
Now when entering the page, the data of this URL is requested by default. I want to change the path of the URL after the change() event. What should I do?
I tried the following method, but it didn’t work.
mainGridOptions.dataSource.transport.read({
url: "/test2"
});
Write the request into a method, and pass the url and contentType in as attributes of an object. The business processing after the request is successful is also handled with a callback function. Just execute this method after the change event