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.
Unfortunately, activation email could not send to your email. Please try again.

How to change the SfDataGrid current filters externally by code

Thread ID:

Created:

Updated:

Platform:

Replies:

128282 Jan 12,2017 05:03 AM Jan 13,2017 06:40 AM WPF 1
loading
Tags: SfDataGrid
Silvio
Asked On January 12, 2017 05:03 AM

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 ?

Sivakumar R [Syncfusion]
Replied On January 13, 2017 06:40 AM

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 


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.

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.

;