Back to Devexpress

GridColumn.FilterInfo Property

windowsforms-devexpress-dot-xtragrid-dot-columns-dot-gridcolumn-25633eb4.md

latest2.6 KB
Original Source

GridColumn.FilterInfo Property

Gets or sets the filter condition applied to the column.

Namespace : DevExpress.XtraGrid.Columns

Assembly : DevExpress.XtraGrid.v25.2.dll

NuGet Packages : DevExpress.Win.Grid, DevExpress.Win.Navigation

Declaration

csharp
[Browsable(false)]
public ColumnFilterInfo FilterInfo { get; set; }
vb
<Browsable(False)>
Public Property FilterInfo As ColumnFilterInfo

Property Value

TypeDescription
ColumnFilterInfo

A ColumnFilterInfo object specifying the filter condition applied to the column.

|

Remarks

To apply a filter to a column, assign a ColumnFilterInfo object to the FilterInfo property. You can assign a single ColumnFilterInfo object to multiple columns at once.

To clear a column’s filter specified by the FilterInfo object, call the GridColumn.ClearFilter method.

The following example shows how to assign filter criteria (“[ShipCountry] = ‘Poland’”) to the CustomerID grid column.

csharp
GridColumn columnCustomer = gridView1.Columns["CustomerID"];
columnCustomer.FilterInfo = new ColumnFilterInfo("[ShipCountry] = 'Poland'");
vb
Dim columnCustomer As GridColumn = GridView1.Columns("CustomerID")
columnCustomer.FilterInfo = New ColumnFilterInfo("[ShipCountry] = 'Poland'")

See Filter and Search for more information.

See Also

AllowFilter

ColumnFilterInfo

Filter and Search

GridColumn Class

GridColumn Members

DevExpress.XtraGrid.Columns Namespace