In the help it says:
"If you are binding to remote services, in order to properly initialize and render the pager, your service must specify both the responseDataKey (grid option) and the totalRecCountKey(paging option)."
It doesn't go on to tell you how to specify these two values. Can someone please tell me how to do this in an ASP .NET MVC wrapper?
Also, I need a solution that handles the filtering and sorting that comes through in the url as well.
if you use the MVC wrapper, remote paging , including all remote features work out of the box. so you don't need to set antything. The help snippet you have provided is about the case where you'd like to bind the grid to a different remote service (meaning you don't have the data source available locally. In that case what happens is that the MVC logic for paging/sorting/filtering is not used at all, because you don't have control over the data source (since it comes from a remote service). In that case you not only need to set those properties on the MVC wrappers - the names are exactly the same as the client-side names, but with upper case first letter, but you also need to ensure your service reads those params and filters or pages its data source accordingly.
On the other hand if you have control over your data, the MVC wrapper does all data binding, remote paging/sorting/filtering/groupby/summaries, automatically for you.
The problem I have is with the example at http://samples.infragistics.com/jquery/grid/paging, the binding url collects the entire dataset and returns it to the grid in JSON objects which the grid then applies all the filtering/paging/sorting on.
public JsonResult BindGridPaging()
GridPagingModel model = new GridPagingModel();
var adventureWorksDataContext = this.DataRepository.GetDataContext();
model.GridPaging.DataSource = adventureWorksDataContext.Products;
In my case, my entire dataset is over 50,000 records. Its taking about 4 seconds to convert all those records to JSON objects. Since I am using remote filtering, sorting and paging, any time any of these features are used the user has to wait 4 seconds for the response.
What it should be doing is applying the paging/sorting/filtering before it does the conversion so that it is only converting pagesize number of records.
Ignore that, I have realised that it is my own fault that it is taking so long. It is due to the fact that each time I am converting all the records into view model objects. So consider this issue closed.
However this has lead me to another question which I've put in a separate post: http://forums.infragistics.com/forums/t/62423.aspx