SfGrid paging API Custom Adapter

Hi,

I tried all samples I could find from SfGrid, so if anyone can help would be great!

<SfGrid @ref="Grid" DataSource="@Ordens" AllowPaging="true" Toolbar="@Tool" AllowSorting="true">

<SfDataManager Adaptor="Adaptors.CustomAdaptor">
        <OrderAdaptor></ OrderAdaptor >
 </SfDataManager>

So my  Search (
var Tool = (new List<string>() {"Search" });) needs to call API, next page needs to call API too, order by from colls ( AllowSorting="true" ) needs to call API too

builder.Services.AddHttpClient<IOrderService, OrderService>(client =>

{

    client.BaseAddress = new Uri("https://localhost:7068/api/v1/");

}).AddPolicyHandler(retryPolicy).AddHttpMessageHandler<CustomHttpMessageHandler>();


1 Reply

MS Monisha Saravanan Syncfusion Team April 25, 2022 02:55 PM UTC

Hi Douglas,


Greetings from Syncfusion support.


We suspect that you are facing difficulties while performing data operations(paging, sorting) while binding data using SfDataManager as Custom adaptor as a component. Please find the below link for your reference regarding CustomAdaptor as a Component topic.


Reference: https://blazor.syncfusion.com/documentation/datagrid/custom-binding#custom-adaptor-as-component


While performing sorting/ paging operation, then you can get the corresponding sorting , paging details in DataManagerRequest in Read method of CustomAdaptor. You can get those details and call to your service and perform your operation.


Also, we are quite unclear about your exact issue you are facing. So we need the following details before proceeding further on this scenario. Kindly share the below mentioned details.


  1. Share the Grid code snippet.
  2. Share us more information regarding your query.
  3. Video demonstration of the problem.
  4. Share us whether you need call Api for any CRUD/Data operations performed inside DataGrid.
  5. Share us whether you are facing difficulties in passing parameter from parent to child component.
  6. If possible share us the simple issue reproduceable sample.



The above-requested details will be very helpful for us to validate the reported query at our end and provide the solution as early as possible.


Regards,

Monisha




Loader.
Up arrow icon