<ej-grid id="FlatGrid" allow-paging="true" query="new ej.Query().select(['ID','CustomerID','EmployeeID'])" > <e-datamanager url="/Home/GetIndexData" adaptor="UrlAdaptor" /> . . . . . . </ej-grid> public IActionResult GetIndexData([FromBody]DataManager dm) { IEnumerable datasource = order; DataOperations operation = new DataOperations(); int count = datasource.AsQueryable().Count(); if (dm.Select != null)//select required columns datasource = operation.PerformSelect(datasource, dm.Select); if (dm.Skip >= 0)//for paging datasource = operation.PerformSkip(datasource, dm.Skip); if (dm.Take > 0)//for paging datasource = operation.PerformTake(datasource, dm.Take); return Json(new { result = datasource, count = count }); } |
Request | Response |
| |
- Paging action | Result must hold 12 records as per the request but the count is total records. |
<ej-grid id="FlatGrid" allow-paging="true" query="new ej.Query().select(['ID','CustomerID','EmployeeID'])" > <e-datamanager url="/Home/GetIndexData" adaptor="UrlAdaptor" /> <e-page-settings page-size ="10"/> . . . . </ej-grid> |