windowsforms-devexpress-dot-xtraeditors-dot-filtercontrol-f067fd1d.md
Allows you to customize a node’s settings when it is initialized.
Namespace : DevExpress.XtraEditors
Assembly : DevExpress.XtraEditors.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
[DXCategory("Events")]
public event InitNodeEventHandler InitNode
<DXCategory("Events")>
Public Event InitNode As InitNodeEventHandler
The InitNode event's data class is InitNodeEventArgs. The following properties provide information specific to this event:
| Property | Description |
|---|---|
| IsNewNode | Gets whether the node is newly created. |
| PropertyName | Gets or sets the property (field) name. |
| PropertyType | Gets the type of the current property (column/field). Inherited from BaseNodeEventArgs. |
The event data class exposes the following methods:
| Method | Description |
|---|---|
| SetOperation(FunctionOperatorType) | Sets the operation type for the current node. |
| SetOperation(ClauseType) | Sets the operation type for the current node. |
| SetOperation(String) | Applies a registered custom function to the current node. |
The InitNode event fires in the following cases:
To change the operation type for the current node, use the SetOperation method (available from the event arguments).
The following example sets the default operation type to GreaterOrEqual for the UnitPrice field.
private void filterControl1_InitNode(object sender, DevExpress.XtraEditors.Filtering.InitNodeEventArgs e) {
if (e.PropertyName == "UnitPrice")
e.SetOperation(DevExpress.Data.Filtering.Helpers.ClauseType.GreaterOrEqual);
}
Private Sub FilterControl1_InitNode(sender As Object, e As DevExpress.XtraEditors.Filtering.InitNodeEventArgs) Handles FilterControl1.InitNode
If e.PropertyName = "UnitPrice" Then
e.SetOperation(DevExpress.Data.Filtering.Helpers.ClauseType.GreaterOrEqual)
End If
End Sub
See Also