how to get query string of kendo datasource

好久不见. 提交于 2020-01-07 04:38:16

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!