Skip to main content
All docs
V24.2

TreeListView.ValidateCellCommand Property

Gets or sets a command that allows you to validate the focused cell’s data.

Namespace: DevExpress.Xpf.Grid

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

NuGet Package: DevExpress.Wpf.Grid.Core

Declaration

public ICommand<NodeCellValidationArgs> ValidateCellCommand { get; set; }

Property Value

Type Description
ICommand<NodeCellValidationArgs>

A command that allows you to validate the focused cell’s data.

Remarks

Bind a command to the ValidateCellCommand property to maintain a clean MVVM pattern. The command works like a ValidateCell event handler and allows you to validate cell values in a View Model.

The command bound to the ValidateCellCommand property is executed before the focused cell’s modified value is posted to a data source and allows you to validate its new value.

The NodeCellValidationArgs.NewValue property returns the focused cell’s new value. To indicate that the new value is invalid, set the NodeCellValidationArgs.Result property to an error description.

Set the DataViewBase.AllowLeaveInvalidEditor property to true to allow users to close an editor that did not pass validation.

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

See Also