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

Search in grid foreign field values

Hi guys,

Using EJ2, ASP NET MVC, VS2017

I´d like to be able to search for foreign field values in a grid component. Please see the code bellow:


In this code I am able to search in "numdemanda", it is working fine. I am trying to add search capability to look for values in "clienterz" field (first ForeignKeyValue) and in "itemnome" field (second ForeignKeyValue). 
1 - All field values are listing ok in grid, is it possible to search in its values?
2 - Is it possible to filter grid based on ForeignKeyValues as well?

Thank you!


1 Reply

PS Pavithra Subramaniyam Syncfusion Team September 2, 2019 07:33 AM UTC

Hi Vanderlei, 
 
Query#1: All field values are listing ok in grid, is it possible to search in its values? 
 
Yes, In essential JavaScript 2 Grid foreign Key columns , you need to provide the “foreignKeyField” value in the searchSettings property which is the default behavior. So you can filter the foreignKey values based on the entered values in search box or in searchSettings option 
 
Query#2: Is it possible to filter grid based on ForeignKeyValues as well? 
 
Yes you can filter the foreign key values by default without any customization. Please refer to the below demo link for your reference. 
 
 
Please get back to us if you need any further assistance on this. 
 
Regards, 
Pavithra S. 


Loader.
Live Chat Icon For mobile
Up arrow icon