I am using kendo ui grid with server side paging, filtering and sorting. With C# WebAPI where all the grid parameters such as filters, sorts and currentpage and page size are sent in the url by kendo grid API and I have DataSourceRequest in my WebAPI which can read all the query params and apply them while I return back the data from the API.
I have a specific situation where. I have an export link in which I will need to use $http service to invoke the same API which I have used with all the filters and sorts that are applied to the grid with all the records to be returned.
I have all the properties of grid such as filters, and sorts.
which I can access from kendogrid's datasource
var query = {
page: 1,
pageSize: grid.dataSource.total(),
sort: grid.dataSource.sort(),
filter: grid.dataSource.filter()
}
I need to invoke the same API which I use to render kendogrid by applying all the filters and sorts. can any one help me how does kendo grid generate the query string with all these params. so may be I can re-use the same function
http://localhost:3306/api/test/62ca5945e15b0cb85bec257eec8f0bf1/grid?filter=stepType~eq~%27Rejected%27&sort=&aggregate=&pageSize=10&page=2&isFirstLoad=false&showColumns=name%2CtotalScore%2Crank%2CexpirationDate%2CstepName%2C&_=1450310137369
Can anyone help me where can I find a function to generate all the query parameters with the filters, pagination and sorting values that I retrieved from grid.