2X faster development
The ultimate WPF UI toolkit to boost your development speed.
GridDataControl allows you to create filters and apply them from code behind in two ways,
Column filter: You can apply filter to a particular column by adding FilterPredicate to the Filters of that VisibleColumn using Filters.Add method. FilterPredicate class has the following properties.
Filter Behavior
Filter Type
Predicate Type
You can set any Predicate Type and conditions available in Predicate class to a VisibleColumn’s Filter. Refer the following code example, where column filter is applied to the “Companyname” column with FilterType “Equals”, FilterValue “Syncfusion”, and PredicateType as “And”. C#
Following snapshots illustrates the effect of above code in GridDataControl
View Filters: GridDataControl provides support to achieve view filtering by setting the GridDataControl.Model.View.Filter property. FilterRecords method filters the data that contains the filterText value. To filter a column assign, FilterRecords method to GridDataControl.Model.View.Filter predicate. Refer the following code. C#
Following snapshot illustrates the effect of above code in GridDataControl
In this example, the GridDataControl contains EmployeeDetails as ItemsSource. FilterRecords method is used to filter the filterText (filterText is the text entered in the text box in the view). FilterRecords is assigned to dataGrid.Model.View.Filter predicate to filter the “EmpName” column. Here the EmpName column is filtered using a search string “raj”. |
2X faster development
The ultimate WPF UI toolkit to boost your development speed.
This page will automatically be redirected to the sign-in page in 10 seconds.