We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Passing additional parameters to custom data binding (DataAdapter)

I am trying to implement Custom data adapter as service.
Is there a way to pass additional parameters custom methods eg 

`public override object Read(DataManagerRequest dm, string key = null)`



Use case for  passing parameters  from razor page / component to custom DataAdatper service is passing userId to service  so we can filter records according to user requesting data for grid, also sometimes my forms has additional filters set beyond scopes  of grid columns.


3 Replies

VN Vignesh Natarajan Syncfusion Team January 13, 2020 12:28 PM UTC

 
Greetings from Syncfusion support.  
 
Query: “Is there a way to pass additional parameters custom methods eg  
 
We have already documented your requirement in our UG documentation section. Kindly refer the below documentation for your reference. 
 
 
if you want to send additional parameters, kindly use Query property of EjsGrid to achieve your requirement.  
 
@using Syncfusion.EJ2.Blazor.Data 
@using Syncfusion.EJ2.Blazor.Grids 
 
<EjsGrid TValue="Order" ID="Grid" AllowSorting="true" Query="@Query" AllowFiltering="true" AllowPaging="true"> 
    . . . . . . .. . . . . . 
</EjsGrid> 
 
@code{ 
    public static List<Order> Orders { get; set; } 
    public Query Query = new Query().AddParams("Code", 10); 
 
 
 
You can get the values in Params property of DataManagerRequest class (Refer above screenshot). Kindly refer the below documentation for your reference 
 
 
Please get back to us if you have further queries.   
 
Regards, 
Vignesh Natarajan. 



AH Admir Hodžic January 13, 2020 01:34 PM UTC

Thank you, a lot.
Apologies for opening ticket,  I did know that I  thought that adding query only works with DataManager attached to url (remote data).


VN Vignesh Natarajan Syncfusion Team January 14, 2020 03:27 AM UTC

Hi Admir,  
 
Thanks for the update.  
 
Query property can be used without the EjsDataManager. Using Query property we can filter, sort, send additional parameters to modify the Grid datasource with or without DataManager. We are glad to hear that you are able to achieve your requirement.    
 
Kindly get back to us if you have further queries.  
 
Regards, 
Vignesh Natarajan. 


Loader.
Live Chat Icon For mobile
Up arrow icon