FilterControl.InitNode Event
In This Article
Allows you to customize a node’s settings when it is initialized.
Namespace: DevExpress.XtraEditors
Assembly: DevExpress.XtraEditors.v24.2.dll
NuGet Package: DevExpress.Win.Navigation
#Declaration
#Event Data
The InitNode event's data class is InitNodeEventArgs. The following properties provide information specific to this event:
Property | Description |
---|---|
Is |
Gets whether the node is newly created. |
Property |
Gets or sets the property (field) name. |
Property |
Gets the type of the current property (column/field).
Inherited from Base |
The event data class exposes the following methods:
Method | Description |
---|---|
Set |
Sets the operation type for the current node. |
Set |
Sets the operation type for the current node. |
Set |
Applies a registered custom function to the current node. |
#Remarks
The InitNode event fires in the following cases:
- You add a new node in the Filter Control. In this case, the IsNewNode event parameter returns true.
- You change the property (field) name for an existing node (via a dropdown list). In this case, the IsNewNode event parameter returns false.
To change the operation type for the current node, use the SetOperation method (available from the event arguments).
#Example
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);
}
See Also