问题
I am using kendo grid to which data is provided by kendo data source. I am using quite a complicated filter and thats why I have to use parameterMap function to do some sorting and filtering. When the query is sent, the query string is automatically prepared by the data source and everything works fine. I need a way to store this url (at least the query string) for every read request. Is there a way to access it?
回答1:
After some research... that was pretty easy. It is enough to use decodeURIComponent before returning data in the parameterMap function:
parameterMap: function (data, operation) {
...
storeSomewhereTheValueOf(decodeURIComponent($.param(data)));
return data;
}
来源:https://stackoverflow.com/questions/44987572/how-to-get-query-string-of-kendo-datasource