All docs
V21.1
21.2 (EAP/Beta)
21.1
20.2
The page you are viewing does not exist in version 20.2. This link will take you to the root page.
20.1
The page you are viewing does not exist in version 20.1. This link will take you to the root page.
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

TreeListView.NodeCanceledCommand Property

Gets or sets a command executed when the changes made in a node are discarded.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v21.1.dll

Declaration

public ICommand<NodeCanceledArgs> NodeCanceledCommand { get; set; }

Property Value

Type Description
DevExpress.Mvvm.ICommand<NodeCanceledArgs>

A command executed when the changes made in a node are discarded.

Remarks

Bind a command to the NodeCanceledCommand property to maintain a clean MVVM pattern. The command works like a NodeCanceled event handler and allows you to process the node edit discard operation in a View Model.

You can discard changes made within a node while it has focus. The GridControl updates the data source when focus moves to another node.

Press ESC twice to discard changes. Press ESC the first time to close the editor and discard all changes made in the current cell. Then press ESC again to call the IEditableObject.CancelEdit method that discards changes made in other cells of the focused node.

The bound command is called when you press ESC the second time.

Note

If a data item class does not implement the IEditableObject interface, you can discard changes only in the focused cell.

Refer to the following topic if you want to cancel changes made within a row asynchronously: ResultAsync.

See Also