Skip to main content
Tag

ColumnBase.FilterPopupGroupFields Property

Gets or sets names of the fields by which filter values are grouped in the column’s drop-down filter. These names should be separated by comma, semicolon, or space. The order of field names determines the hierarchy in the group.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v23.2.Core.dll

NuGet Package: DevExpress.Wpf.Grid.Core

Declaration

public string FilterPopupGroupFields { get; set; }

Property Value

Type Description
String

Names of the fields by which filter values are grouped in the column’s drop-down filter.

Remarks

You can group filter values in the Excel-style Drop-down Filter to allow users to filter data by multiple columns. Set the FilterPopupGroupFields property to names of the fields by which filter values should be grouped. Separate names by comma, semicolon, or space. The order of field names determines the hierarchy in the group.

Note

You can use the FilterPopupGroupFields property only in the Excel-style Drop-down Filter that works in Smart mode (the ColumnBase.FilterPopupMode property is set to FilterPopupMode.ExcelSmart or the DataViewBase.ColumnFilterPopupMode property is set to ColumnFilterPopupMode.ExcelSmart).

The drop-down filter hides its built-in search panel if you specify the FilterPopupGroupFields property.

Example 1

The code sample below displays the available cities below each country in the Ship Country column’s drop-down filter:

WPF Data Grid - Group Filter Fields Example 1

<dxg:GridControl>
    <dxg:GridControl.Columns>
        <dxg:GridColumn FieldName="ProductName"/>
        <dxg:GridColumn FieldName="ShipCountry" FilterPopupGroupFields="ShipCountry;ShipCity"/>
        <dxg:GridColumn FieldName="ShipCity"/>
    </dxg:GridControl.Columns>
  <!-- ... -->
</dxg:GridControl>

The customized column’s values are displayed at the root level. You can omit its name (“ShipCountry”). The code sample below has the same effect:

<dxg:GridControl>
    <dxg:GridControl.Columns>
        <dxg:GridColumn FieldName="ProductName"/>
        <dxg:GridColumn FieldName="ShipCountry" FilterPopupGroupFields="ShipCity"/>
        <dxg:GridColumn FieldName="ShipCity"/>
    </dxg:GridControl.Columns>
  <!-- ... -->
</dxg:GridControl>

Example 2

The code sample below displays the available cities below each country in the Ship City column’s drop-down filter:

WPF Data Grid - Group Filter Fields Example 2

<dxg:GridControl>
    <dxg:GridControl.Columns>
        <dxg:GridColumn FieldName="ProductName"/>
        <dxg:GridColumn FieldName="ShipCountry"/>
        <dxg:GridColumn FieldName="ShipCity" FilterPopupGroupFields="ShipCountry;ShipCity"/>
    </dxg:GridControl.Columns>
  <!-- ... -->
</dxg:GridControl>

The customized column’s values are not displayed at the root level in this case, its name (“ShipCountry”) cannot be omitted.

See Also