The event handler receives an argument of type ShowValueEditorEventArgs containing data related to this event.
The following
ShowValueEditorEventArgs properties provide information specific to this event.
Property |
Description |
CurrentNode |
Gets the current node in the FilterControl's tree of criteria. |
CustomRepositoryItem |
Allows you to specify a custom editor to be opened instead of the default one, specified by the Editor property. |
Editor |
Gets the currently processed editor. |
FocusedElementIndex |
Gets the index of the current operand value. |
OperandValue |
Gets the current operand value. |
Operation |
Gets the operation of the current node. |
PropertyName |
Gets the name of the current property (column/field). |
PropertyType |
Gets the type of the current property (column/field). |
To access the operand value currently being edited and customize the editor used to edit the value, use the parameters provided by the event.

Example
In this example, custom editors are provided to edit value operands in the FilterControl.
The custom editors (SpinEdit and CalcEdit) are supplied by handling the BeforeShowValueEditor event. To supply the editors, corresponding repository items are created and assigned to the event's CustomRepositoryItem parameter.In the example, the FilterControl is used within a GridControl. To get access and subscribe to the FilterControl's BeforeShowValueEditor event, the GridView.FilterEditorCreated event is handled.
The following image shows the result.

Form1.cs |
private void gridView1_FilterEditorCreated(object sender, FilterControlEventArgs e) {
e.FilterControl.BeforeShowValueEditor +=
new ShowValueEditorEventHandler(FilterControl_BeforeShowValueEditor);
}
void FilterControl_BeforeShowValueEditor(object sender, ShowValueEditorEventArgs e) {
if(e.CurrentNode.FirstOperand.PropertyName != "Payment") return;
RepositoryItemTextEdit item = null;
if(e.FocusedElementIndex == 2)
item = new RepositoryItemSpinEdit();
else
item = new RepositoryItemCalcEdit();
item.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.Numeric;
item.Mask.EditMask = "c";
e.CustomRepositoryItem = item;
}
|
Form1.vb |
Private Sub gridView1_FilterEditorCreated(ByVal sender As Object, _
ByVal e As FilterControlEventArgs) Handles gridView1.FilterEditorCreated
AddHandler e.FilterControl.BeforeShowValueEditor, _
AddressOf FilterControl_BeforeShowValueEditor
End Sub
Private Sub FilterControl_BeforeShowValueEditor(ByVal sender As Object, _
ByVal e As ShowValueEditorEventArgs)
If e.CurrentNode.FirstOperand.PropertyName <> "Payment" Then
Return
End If
Dim item As RepositoryItemTextEdit = Nothing
If e.FocusedElementIndex = 2 Then
item = New RepositoryItemSpinEdit()
Else
item = New RepositoryItemCalcEdit()
End If
item.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.Numeric
item.Mask.EditMask = "c"
e.CustomRepositoryItem = item
End Sub
|

Example
The following code shows how to handle the BeforeShowValueEditor event for a FilterControl being used in the Grid Control.
This event fires when an editor used to edit an operand value is invoked. In the example, the editor's foreground color is modified.
To subscribe to the BeforeShowValueEditor event when using the FilterControl within the Grid Control, the ColumnView.FilterEditorCreated event is handled.
C# |
using DevExpress.XtraEditors.Filtering;
using DevExpress.XtraGrid.Views.Base;
private void gridView1_FilterEditorCreated(object sender, FilterControlEventArgs e) {
e.FilterControl.BeforeShowValueEditor +=
new ShowValueEditorEventHandler(FilterControl_BeforeShowValueEditor);
}
void FilterControl_BeforeShowValueEditor(object sender, ShowValueEditorEventArgs e) {
e.Editor.Properties.Appearance.ForeColor = Color.Red;
}
|
VB |
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.BeforeShowValueEditor, AddressOf FilterControl_BeforeShowValueEditor
End Sub
Private Sub FilterControl_BeforeShowValueEditor(ByVal sender As Object, ByVal e As ShowValueEditorEventArgs)
e.Editor.Properties.Appearance.ForeColor = Color.Red
End Sub
|