- Home
- Forum
- ASP.NET MVC
- Filtering, Search, Checkbox and Sorting bugs Version 12.4.0.34
Filtering, Search, Checkbox and Sorting bugs Version 12.4.0.34
Attachment: files_5ce46976.zip
Hi David,
Thanks for using Syncfusion products.
Based your requirement we have created a sample and the same can be downloaded from following link:
Sample: Server_side_sorting.zip
Please refer the Knowledge base documentation for more information regarding the server side operations using the url adaptor in the following link.
Documentation link: http://www.syncfusion.com/kb/4300/server-side-api-for-datamanager-operations
Please let us know If you have any queries.
Regards,
J.Mohammed Farook
[WebMethod] [ScriptMethod(ResponseFormat = ResponseFormat.Json)] public static object Data(Syncfusion.JavaScript.DataManager value) { IEnumerable Data = OrderRepository.GetAllRecords(); int count = Data.AsQueryable().Count(); Syncfusion.JavaScript.DataSources.DataOperations operation = new Syncfusion.JavaScript.DataSources.DataOperations(); Data = operation.Execute(Data, value); return new { result = Data, count = count }; } Hi David,
Sorry about the inconvenience caused.
We have analyzed your query and found that you have stored the count of DataSource, before performing the server side operation and returning that count. Hence you have got the total count of the data base.
Based on your requirement we have created a sample by using server side data operations and get the count after performing the data operations. The sample can be downloaded from the following link location.
Sample Link: http://www.syncfusion.com/downloads/support/forum/118724/Sample_1187241752562504.zip
Please refer the following code snippet for DataOperations at server side.
public ActionResult DataSource(Syncfusion.JavaScript.DataManager dm) { IEnumerable Data = OrderRepository.GetAllRecords(); DataResult result = new DataResult(); DataOperations operation = new DataOperations(); IEnumerable res = operation.Execute(Data, dm); result.result = res; result.count = res.AsQueryable().Count(); return Json(result, JsonRequestBehavior.AllowGet); } |
For your reference we have also attached the screenshot of getting the count after performing the filter operation.
Please try the above sample and let us know if it helps.
If we misunderstood your query please get back to us with more information regarding your issue along with the issue reproducing sample. It will help us to provide you with prompt solution.
Regards,
Sellappandi R
Attachment: screenshots_4e41751e.zip
We regret for the inconvenience caused.
We have created a sample by using the PerformWhereFilter method to get the count of the filtered records in server side. The sample can be downloaded from following link location:
Sample Link: http://www.syncfusion.com/downloads/support/forum/118724/Samples_118724-194910031.zip
In the above sample we have used the PerformWhereFilter to perform the server side filter operation and we stored filtered count in result.count. Please refer the following code snippet.
public ActionResult DataSource(Syncfusion.JavaScript.DataManager dm) { IEnumerable Data = OrderRepository.GetAllRecords(); DataResult result = new DataResult(); DataOperations operation = new DataOperations(); if(dm.Where != null) Data=operation.PerformWhereFilter(Data, dm.Where, ""); IEnumerable res = operation.Execute(Data, dm); result.result = res; result.count = Data.AsQueryable().Count(); return Json(result, JsonRequestBehavior.AllowGet); |
For your convenience we have attached screen shot in below for the output after filtered in verified column.
Please try the above sample and get back to us if you need any further assistance.
Regards,
Sellappandi R
- 5 Replies
- 3 Participants
-
DG David Galeano
- Apr 3, 2015 05:39 PM UTC
- Apr 23, 2015 01:54 PM UTC