Skip to main content

How to: Customize Operand Editor Properties in FilterControl

The following code handles the FilterControl.ValueEditorShown event to change the foreground color of operand editors in Data Grid’s embedded Filter Control.

The ColumnView.FilterEditorCreated event is used to subscribe to the FilterControl.BeforeShowValueEditor event.

FilterControl - ValueEditorShown

using DevExpress.XtraEditors.Filtering;
using DevExpress.XtraGrid.Views.Base;

private void gridView1_FilterEditorCreated(object sender, FilterControlEventArgs e) {
    e.FilterEditor.ValueEditorShown += FilterEditor_ValueEditorShown;
}

private void FilterEditor_ValueEditorShown(object sender, ValueEditorEventArgs e) {
    e.Editor.Properties.Appearance.ForeColor = Color.Red;
}