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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Passing additional parameters to custom data binding (DataAdapter)

Thread ID:

Created:

Updated:

Platform:

Replies:

150554 Jan 10,2020 07:06 PM UTC Jan 14,2020 03:27 AM UTC Blazor 3
loading
Tags: Grid
Admir Hodžic
Asked On January 10, 2020 07:06 PM UTC

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.


Vignesh Natarajan [Syncfusion]
Replied On 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. 


Admir Hodžic
Replied On 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).

Vignesh Natarajan [Syncfusion]
Replied On 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. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon