How to filter grid data programmatically?
|
Article Information
|
Article relates to VIBlend DataGrid for Silverlight
|
How To
|
Filter DataGrid's data programmatically
|
Solution
|
In order to achieve this, you need to follow the steps below:
|
1. Create DataGrid’s Rows, Columns and fill it with sample data.
|
|
2. Create a new NumericFilter and set its ComparisonOperator and Value properties.
|
|
3. Create a new HierarchyItemFilter object and add the FilterGroup to it.
|
|
4. Finally, add the HierarchyItemFilter instance to the Filters collection of the DataGrid’s RowsHierarchy.
|
|
|