Skip to main content
All docs
V25.1
  • 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.v25.1.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