windowsforms-devexpress-dot-xtraeditors-dot-filtercontrol-0d12de5d.md
Fires after an operand’s editor has been displayed.
Namespace : DevExpress.XtraEditors
Assembly : DevExpress.XtraEditors.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
[DXCategory("Events")]
public event EventHandler<ValueEditorEventArgs> ValueEditorShown
<DXCategory("Events")>
Public Event ValueEditorShown As EventHandler(Of ValueEditorEventArgs)
The ValueEditorShown event's data class is ValueEditorEventArgs. The following properties provide information specific to this event:
| Property | Description |
|---|---|
| Editor | Gets the currently processed editor. |
| PropertyName | Gets the name of the current property (column/field). Inherited from BaseNodeEventArgs. |
| PropertyType | Gets the type of the current property (column/field). Inherited from BaseNodeEventArgs. |
The ValueEditorShown event fires after the editor used to edit a value operand is invoked. Handle this event to customize the editor’s settings.
The following code snippet handles the FilterControl.ValueEditorShown event to change the foreground color of operand editors in the Data Grid’s embedded Filter Control.
The ColumnView.FilterEditorCreated event is used to subscribe to the ValueEditorShown event.
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;
}
Imports DevExpress.XtraGrid.Views.Base
Imports DevExpress.XtraEditors.Filtering
Private Sub GridView1_FilterEditorCreated(ByVal sender As System.Object, ByVal e As FilterControlEventArgs) _
Handles GridView1.FilterEditorCreated
AddHandler e.FilterControl.ValueEditorShown, AddressOf FilterControl_ValueEditorShown
End Sub
Private Sub FilterControl_ValueEditorShown(ByVal sender As Object, ByVal e As ValueEditorEventArgs)
e.Editor.Properties.Appearance.ForeColor = Color.Red
End Sub
See Also