ComponentOne FlexGrid for WinForms
Filtering by Value
FlexGrid for WinForms Task-Based Help > Filtering by Value

To use the ValueFilter, follow these steps:

  1. Select the grid and click the smart tag to open the C1FlexGrid Tasks menu.
  2. Select the Enable Column Filtering check box.
  3. Click the Designer link. The C1FlexGrid Column Editor appears.
  4. Click the drop-down arrow next to the AllowFiltering property and select ByValue.

In Code

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

This topic illustrates the following:

In this example, the second column is sorted by value: