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 to change the SfDataGrid current filters externally by code

Hi,

I have some form where I'd like to insert my own controls to let user filter the data in the SfDataGrid.
Is it possible, using code, to set your filter data programmatically?
If yes, can you provide me an example ?

1 Reply

SR Sivakumar R Syncfusion Team January 13, 2017 11:40 AM UTC

Hi Silvio, 
 
Yes, you can programmatically filter SfDataGrid in below two ways, 
 
View Filtering 
Please refer below documentation link which explains about how to filter by setting SfDataGrid.View.Filter property. 
 
Sample: 
 
Column Filter predicates 
Please refer the below documentation link which explains about how to filter by adding FilterPredicate to GridColumn.FilterPredicates property. 
 
Sample: 
 
Note: 
You can refer below articles, if you want to customize the built-in filter UI or functionality. 
 
Thanks, 
Sivakumar 


Loader.
Up arrow icon