Skip to main content

ViewFilter.NonColumnFilter Property

Gets or sets a filter expression that is not associated with any column.

Namespace: DevExpress.XtraGrid.Views.Base

Assembly: DevExpress.XtraGrid.v24.1.dll

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


public string NonColumnFilter { get; set; }

Property Value

Type Description

A string that specifies a filter expression (not associated with any column) that is applied to the current View.


Regular column filters are based on column values, and can be modified by users at runtime (using column drop-down menus). For example, the following expression filters data by the “Quantity” and “UnitPrice” columns:

gridView1.ActiveFilterString = "Quantity > 3 AND UnitPrice > 10";

Non-column filters are used to set up filter conditions for multiple columns at once. For example, the following expression multiplies the unit price and quantity to calculate the total order cost and filter Grid data by that number.

gridView1.ActiveFilter.NonColumnFilter = "UnitPrice * Quantity >= 50";

Since this expression is not associated with one specific column, users cannot utilize column drop-down menus to modify it.

Note that if you set up a non-column filter expression that can be translated to regular column filters, a Data Grid will do so automatically.

gridView1.ActiveFilter.NonColumnFilter = "UnitPrice > 10 AND Quantity >= 3";
// Equal to regular column filter
// gridView1.ActiveFilterString =  "UnitPrice > 10 AND Quantity >= 3";


The following example shows how to assign a filter to a View using the ViewFilter.NonColumnFilter property.

gridView1.ActiveFilter.NonColumnFilter = "Quantity * UnitPrice >= 100";
See Also