Skip to main content
All docs
V24.2

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TreeListView.InvalidNodeExceptionCommand Property

Gets or sets a command that is executed when a node fails validation or cannot be saved to a data source.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v24.2.dll

NuGet Package: DevExpress.Wpf.Grid.Core

#Declaration

public ICommand<InvalidNodeExceptionArgs> InvalidNodeExceptionCommand { get; set; }

#Property Value

Type Description
ICommand<InvalidNodeExceptionArgs>

A command that is executed when a node fails validation.

#Remarks

Bind a command to the InvalidNodeExceptionCommand property to maintain a clean MVVM pattern. The command works like an InvalidNodeException event handler and allows you to specify an error presentation in a View Model.

Create a command and bind it to the TreeListView.ValidateNodeCommand property to validate entered values. After this command is processed, the GridControl executes a command bound to the InvalidNodeExceptionCommand property and allows you to specify how to display validation errors.

Use the InvalidNodeExceptionArgs.ExceptionMode property to specify which action to perform when a user enters an invalid value. You can display a message box with an error description, suppress an action, throw an exception, or ignore the validation result.

Refer to the following help topic for more information: Row Validation.

See Also