Hello , i am using the MvcContrib grid for an mvc application. I have set up sorting and paging , but I have to make the grid to go the first page when the user sorts the grid .
Any ideas on how doing that ?
Hello , i am using the MvcContrib grid for an mvc application. I have set up sorting and paging , but I have to make the grid to go the first page when the user sorts the grid .
Any ideas on how doing that ?
You could append an additional parameter to the sort action which is currentPage
or whatever you use in your pager to track the current page and when generating this link set the parameter value to 1
. Also make sure that on the server side in the sorting action you are specifying the proper range when paging the data source (.AsPagination(1, PAGE_SIZE)
).