Query remote data from dropdown in grid

Hello,

I have a dropdown inside a grid. How do I enable search and send a search query to the backend? Below is my code


<e-grid-column field="@column.Data" headerText="MyTitle" autoFit="true" allowFiltering="true" edittype="DropDownEdit" foreignKeyValue="Text" foreignKeyField="Value" allowSearching="true" allowEditing="@isEditable">

    <e-data-manager crossDomain="true" adaptor="WebApiAdaptor" url="@dropDown.Url" ></e-data-manager>

/e-grid-column>


1 Reply

AG Ajith Govarthan Syncfusion Team August 24, 2021 03:10 PM UTC

Hi Andrew, 

Thanks for contacting Syncfusion support. 

Query: I have a dropdown inside a grid. How do I enable search and send a search query to the backend? 
 
Based on your query you want to send search query to the server side. So, before we proceed to your query, please share the below details to validate further on your requirement. 

  1. Share the complete Grid code example.

  1. Do you want to send the search query while searching in the Grid component?
 
  1. Do you want to send search query when searching in the dropdown which is rendered in the edit mode?
 
  1. Share the screenshot or video demo of your requirement.
 
  1. Share the Syncfusion package version.
 
Note:  We have checked your attached code example and found that you have used the foreignkey column without using the foreignkey dataSource. By default, in our EJ2 Grid if you use the foreignkey column then you need to specify the foreignkey dataSource for the respective column to show the data based on the foreignkey concept. Otherwise, the column will show the data only based on the column.field value. 

 
Regards, 
Ajith G. 



Loader.
Up arrow icon