Skip to main content
A newer version of this page is available. .

VGridControl.FilterPopupExcelData Event

Allows you to remove and modify items in the Excel-style Filter Dropdown, as well as add your own custom items that apply specific filtering conditions.

Namespace: DevExpress.XtraVerticalGrid

Assembly: DevExpress.XtraVerticalGrid.v19.1.dll

Declaration

[DXCategory("Behavior")]
public event FilterPopupExcelDataEventHandler FilterPopupExcelData

Event Data

The FilterPopupExcelData event's data class is DevExpress.XtraVerticalGrid.FilterPopupExcelDataEventArgs.

Remarks

The code snippet below shows how to handle the FilterPopupExcelData event to add custom filters for particular columns.


private void vGridControl1_FilterPopupExcelData(object sender, DevExpress.XtraVerticalGrid.FilterPopupExcelDataEventArgs e) {
    string fieldName = e.Column.Row.Properties.FieldName;
    if (e.Column.Row == rowCountry) {
        e.AddFilter("Europe", "[" + fieldName + "] = 'France' OR [" + fieldName + "] = 'Germany'");
        e.AddFilter("North America", "[" + fieldName + "] = 'Canada' OR [" + fieldName + "] = 'Mexico'");
        e.AddFilter("South America", "[" + fieldName + "] = 'Argentina' OR [" + fieldName + "] = 'Brazil'");
    }
}

See the result below.

VGrid_FilterPopupExcelData

See Also