| FlexGrid for WinForms Task-Based Help > Filtering by Value |
To use the ValueFilter, follow these steps:
Add the following code to the Form_Load event:
To write code in Visual Basic
| Visual Basic |
Copy Code
|
|---|---|
Me.C1FlexGrid1.AllowFiltering = True Me.C1FlexGrid1.Cols(1).AllowFiltering = AllowFiltering.ByValue |
|
To write code in C#
| C# |
Copy Code
|
|---|---|
this.c1FlexGrid1.AllowFiltering = true; this.c1FlexGrid1.Cols[1].AllowFiltering = AllowFiltering.ByValue |
|
In this example, the second column is sorted by value: