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

How do I both filter AND search a specific column?

I visited https://help.syncfusion.com/wpf/datagrid/search for the purpose of doing two things:
1. Filter results
2. Column-specific search

I've implemented them both but the problem is that the filtering works regardless of the column specified.

-----------------------

Say I have this table:
NameQuantityBrand
Viper Steel1Patriot
Vengeance LPX2Corsair
Trident Z3G.Skill

Now I want to:

1. Filter results that has "ri"

2. Search only under the column "Name"

What happens after running "ProductDataGrid.SearchHelper.Search("ri");" is:

1. 2nd row (Vengeance LPX) gets filtered out - this is intentional and running fine

2. It'll still show the 1st row with Viper Steel because the string "ri" exists within the brand Pat"ri"ot. But what I really wanted to do was to only look for "ri" among the Name column, if it doesn't exist there then filter it out, it doesn't matter whether there's a "ri" string from other columns.


3 Replies

SP Shobika Palani Syncfusion Team November 8, 2019 09:32 AM UTC

Hi Mark,   
  
Thank you for contacting Syncfusion Support.   
  
We have KB for searching and filtering in specific column alone which satisfies your requirement. Please refer the below KB link.  
  
KB Link:   
  
Also, please refer the below sample.  
Sample Link:   
  
Please let us know, if you need any further other assistance from us.   
  
Regards,
Shobika
  



MA Mark November 18, 2019 03:41 PM UTC

Thank you so much for the reply it worked


MA Mohanram Anbukkarasu Syncfusion Team November 19, 2019 07:10 AM UTC

Hi Mark, 

Thanks for the update. 

We are glad to know that the provided solution worked at your end. Please let us know if you have any further queries on this. We are happy to help you. 

Regards, 
Mohanram A 


Loader.
Up arrow icon