We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Pulling an entire data source? Why not IQueryable

So i'm using the mvc grid and the UrlAdaptor Data source which returns a result set.  I can't seem to get it to work with IQueryable though.  every time i move to another page (Using Paging) it pulls the entire table.  I'm using entity framework.  Any insight on how this could be accomplished without loading every single record?

1 Reply

GV Gowthami V Syncfusion Team May 9, 2016 10:22 AM UTC

Hi Micah, 

We have analyzed your query and we suspect that you may returned all the data without performing skip and take operations in server side as follows, 

        .Datasource(ds => ds.URL("GetEmployeeData").Adaptor(AdaptorType.UrlAdaptor)) 
        .PageSettings(page => { page.PageSize(3); }) 
        . . . . 
ActionResult GetEmployeeData(DataManager dm) 
. . . .  
. . . . 
int count = data.AsQueryable().Count(); 
            DataOperations operation = new DataOperations(); 
            //Performing paging operations 
            data = operation.PerformSkip(data, dm.Skip); 
            data = operation.PerformTake(data, dm.Take); 
            return Json(new { result = data, count = count }, JsonRequestBehavior.AllowGet); 

Refer to the below screenshot, 


While using UrlAdaptor we need to perform all the grid actions like Filtering, Sorting, Searching and Summary in the server side. 

Refer to the below link for more clarification, 

We have created a sample for your reference and the same can be downloaded from the following link, 


Gowthami V. 

Live Chat Icon For mobile
Up arrow icon