BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
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
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); |