- Home
- Forum
- ASP.NET Core - EJ 2
- Generic Server Side Pagination, Sorting and Filtering
Generic Server Side Pagination, Sorting and Filtering
Hello
I am using ASP.NET CORE EJ 2 version 16.1.0.34 (nuget package).
Could you please provide me with a generic example for a server side pagination, sorting and filtering when using the UrlAdaptor?
I found an example for EJ 2 for MVC (https://www.syncfusion.com/forums/136599/server-side-pagination-sorting-and-filtering), however in this example the sorting needs to be created manually on the server side, with a switch for each property of the object. This is an absolute no go!
In EJ 1 pagination, sorting and filtering worked almost out of the box with the "DataOperations" class.
What is the recommended approach for achieving this using EJ 2?
Kind regards
Phil
SIGN IN To post a reply.
8 Replies
VA
Venkatesh Ayothi Raman
Syncfusion Team
April 23, 2018 11:58 AM UTC
Hi Phil,
Thanks for using Syncfusion products.
We have already considered this “Need to provide built-in support Data operation class in EJ2” to perform the server-side operations Sorting, filtering and paging as a feature. This feature will be included in upcoming Volume 2, 2018 release which is expected to be rolled out in the month of May 2018. Until we suggest you use the workaround which we provided by us.
Regards,
Venkatesh Ayothiraman.
UN
Unknown
April 24, 2018 07:07 AM UTC
Thank you for your reply.
I am Glad to hear this will be available soon.
Then I will use the workaround for now and change to the "official" version once it is available.
Kind regards
Phil
MS
Mani Sankar Durai
Syncfusion Team
April 25, 2018 11:55 AM UTC
Hi Phil,
As we said, this feature “Need to provide built-in support Data operation class in EJ2” will be included in upcoming Volume 2, 2018 release which is expected to be rolled out in the month of May 2018.
We will appreciate your patience until then.
Regards,
Manisankar Durai
UN
Unknown
July 9, 2018 09:26 AM UTC
Hello
The Volume 2, 2018 release was now released, thus this feature should be implemented.
Since the documentation does not seem to be updated, could you please provide me with an example on how to do the server-side sorting, filtering, paging, etc. functionalities that should now be available?
Please remember, I use UrlAdaptor.
I saw that there are new classes such as "DataManagerRequest". Please show me the recommended approach for using these kind of functionalities as easily as possible. It would be great if all of these can be executed with a single command.
RD
Ronald Dirkx
July 9, 2018 02:38 PM UTC
Hi Phil
I'm using the approach shown in the example here: https://aspdotnetcore.syncfusion.com/Grid/UrlAdaptor#/bootstrap look at Source > urladaptor.cs
I don't use DataOperations as I have a custom datasource but pagination works fine for me.
VA
Venkatesh Ayothi Raman
Syncfusion Team
July 10, 2018 04:21 AM UTC
Hi Phil,
Thanks for the update.
Yes, we have rolled out the Volume 2, 2018 release and we have updated the URL adaptor sample in our sample browser. Please refer to the following Online demo and Help documentation for more information,
Help documentation:https://ej2.syncfusion.com/aspnetmvc/documentation/grid/databinding.html#handling-on-demand-grid-actions
Note: We have also provided custom adaptor support for handling the server-side request.
Please let us know if you have any further assistance on this.
Regards,
Venkatesh Ayothiraman.
UN
Unknown
August 14, 2018 06:13 AM UTC
Thank you for the reply.
With the given instructions I was able to perform the grid actions on the server.
I use the "Execute" function, since I don't want to do all the checks by myself. I presume there is no drawback to using Excecute() instead of doing all the operations manually?
MS
Mani Sankar Durai
Syncfusion Team
August 16, 2018 06:39 AM UTC
Hi Phil,
We have checked your query and We have prepared a simple sample which uses ‘Execute’ method to perform DataOperations. Please refer to the below code example and sample link.
[controller.cs]
|
public ActionResult DataSource([FromBody]DataManagerRequest dm)
{
IEnumerable DataSource = OrdersDetails.GetAllRecords();
DataOperations operation = new DataOperations();
var count = DataSource.AsQueryable().Count();
var data = operation.Execute(DataSource, dm);
return dm.RequiresCounts ? Json(new { result = data, count = count }) : Json(DataSource);
} |
[index.cshtml]
|
<ejs-grid id="Grid" allowPaging="true" allowSorting="true" allowFiltering="true" toolbar="@(new List<string>() {"Search" })">
<e-grid-columns>
. . .
</e-grid-columns>
</ejs-grid> |
Note: ‘Grouping’ action cannot be done using server-side Data Operation.
Regards,
Manisankar Durai.
SIGN IN To post a reply.
- 8 Replies
- 4 Participants
-
UN Unknown
- Apr 20, 2018 02:46 PM UTC
- Aug 16, 2018 06:39 AM UTC