Hi Cristiano,
Thanks for contacting Syncfusion Support.
We have analyzed the screenshots and we are sorry to let you know that we are unable to reproduce the reported issue.
We suspect the cause of the issue may be you have missed to perform the “DataOperation” on the server side. In the URL Adaptor, the “Ajax” post back action is performed for each Grid operation like filtering and sorting. So, return the datasource after performing “DataOperation” on the server side. Please refer to the following code example and screenshot.
[View] var dataManger = ej.DataManager({ url: "/Grid/DataSource", adaptor: "UrlAdaptor" }); [Controller] public ActionResult DataSource(DataManager dm) { var DataSource = OrderRepository.GetAllRecords(); DataResult result = new DataResult(); DataOperations operation = new DataOperations(); IEnumerable res = operation.Execute(DataSource, dm); result.result = res; result.count = res.AsQueryable().Count(); return Json(result, JsonRequestBehavior.AllowGet); } |
|
We have created the sample that can be downloaded from the below link.
http://www.syncfusion.com/downloads/support/forum/120857/ze/URLadaptor_for_JS-2052679799
If still you are facing the issue, could you please share the following details?
1. Share your controller page code
2. Share your console page with call stack if any exception or script error throws?
3. If possible please rreproduce the issue in the above sample
So that we could provide you response as early as possible?
Regards,
Saravanan A.
Hi Cristiano,
Thanks for contacting Syncfusion Support.
Please ignore the previous update.
We have analyzed the screenshots and we are sorry to let you know that we are unable to reproduce the reported issue.
We suspect the cause of the issue may be you have missed to perform the “DataOperation” on the server side. In the URL Adaptor, the “Ajax” post back action is performed for each Grid operation like filtering and sorting. So, return the datasource after performing “DataOperation” on the server side. Please refer to the following code example and screenshot.
[View] var dataManger = ej.DataManager({ url: "/Grid/DataSource", adaptor: "UrlAdaptor" }); [Controller] public ActionResult DataSource(DataManager dm) { IEnumerable DataSource = OrderRepository.GetAllRecords(); DataResult result = new DataResult(); DataOperations operation = new DataOperations(); result.result = DataSource; if (dm.Where != null) { result.result = operation.PerformWhereFilter(result.result, dm.Where, "and"); } if (dm.Sorted != null) { result.result = operation.PerformSorting(result.result, dm.Sorted); } result.count = result.result.AsQueryable().Count(); if (dm.Skip > 0) result.result = operation.PerformSkip(result.result, dm.Skip);
if (dm.Take > 0) result.result = operation.PerformTake(result.result, dm.Take);
return Json(result, JsonRequestBehavior.AllowGet); } |
|
We have created the sample that can be downloaded from the below link.
http://www.syncfusion.com/downloads/support/forum/120857/ze/URLadaptor_for_JS-961480366
If still you are facing the issue, could you please share the following details?
1. Share your controller page code
2. Share your console page with call stack if any exception or script error throws?
3. If possible please rreproduce the issue in the above sample
So that we could provide you response as early as possible?
Regards,
Saravanan A.