Server Side & Client Side Paging

For a Blazor Web assembly - Asp.net Core hosted application is the Syncfusion DataGrid component built to handle server-side and client-side paging?

Currently, we accept a model bound query parameters object in our controller action as a parameter to be passed into our repo layer for handling filtering, search terms, ordering, and paging using linq to entities. Since our service may have service to service communication.

The DataManager object seemed like it was only for use in a Blazor Server-Side project.



3 Replies 1 reply marked as answer

RN Rahul Narayanasamy Syncfusion Team December 23, 2020 01:40 PM UTC

Hi RVS Development, 

Greetings from Syncfusion. 

We have validated your query and we might suspect that you want use the paging operation with Blazor Hosted application(Client and server). We have prepared a sample based on your requirement. Find the below sample for your reference. 


Reference: 

Please let us know if you have any concerns. 

Regards, 
Rahul  




RD RVS Development January 3, 2021 01:38 AM UTC

I am sorry but your solution does not work for my situation.

Again, I am using a Blazor Web Assembly project and have selected Asp.net Core Hosted option. I share DTO objects within the shared class library project. 

Our Web API is not OData specific as your example is. we use a custom set of query string parameters and set our controller parameters to use [FromQuery] to model bind to the custom objects we use for filtering, searching, ordering, and finally paging on the client-side.

Does the URI in conjunction with the WEBAPI adapter used in the example code allow you to send the query string parameter as you want or does it always follow the OData standard? What is generating the query string? Is it overrideable? 

Would it be better to use an httpclient object withing the Blazor client project to manually request my data in the appropriate initialization method? If I were to handle user actions manually which events should be subscribed to for filtering, searching, sorting, and paging? I would need to know this to trigger a new GET request and fresh query string to my endpoint.

I am used to handling the HTTP communication manually, instead of the component handling the communication internally. I cannot find any solid documentation anywhere that describes working with the data grid manually, aside from possibly going down thru the API browser. I am sure that there are many restful web apis out there not using OData. Please describe any options or existing examples / documentation that my shed some light on how to go about this.


RN Rahul Narayanasamy Syncfusion Team January 8, 2021 02:02 PM UTC

Hi RVS Development, 

We have validated your query and you want to handle the http request manually while performing the Grid operations(such as filtering, searching, sorting, etc). For this, we suggest you to achieve your requirement by using either Action events(OnActionBegin) or CustomAdaptor.  

<GridEvents OnActionBegin="ActionBeginHandler" TValue="Orders"></GridEvents>
protected override async Task OnInitializedAsync(){    OrdersService = await OrderData.GetOrders();}public async void ActionBeginHandler(ActionEventArgs<Orders> Args){    if (Args.RequestType == Syncfusion.Blazor.Grids.Action.Save)   //based on the RequestType, you can perform your actions manually.    {        . . .    }}

Reference: 

Please let us know if you have any concerns. 

Regards, 
Rahul 


Marked as answer
Loader.
Up arrow icon