Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
575
Remote paging
posted

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?

Parents Reply
  • 575
    posted in reply to Alexander Todorov

    The problem I have is with the example at https://www.igniteui.com/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();
        this.InitializeSortingGridOptions(model.GridPaging);
        var adventureWorksDataContext = this.DataRepository.GetDataContext();
        model.GridPaging.DataSource = adventureWorksDataContext.Products; 
        return model.GridPaging.GetData();
     }

    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.

Children