Skip to main content
All docs
V24.2

TreeListView.InitNewNodeCommand Property

Gets or sets a command that allows you to initialize a new node with default values.

Namespace: DevExpress.Xpf.Grid

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

NuGet Package: DevExpress.Wpf.Grid.Core

Declaration

public ICommand<InitNewNodeArgs> InitNewNodeCommand { get; set; }

Property Value

Type Description
ICommand<InitNewNodeArgs>

A command that allows you to initialize a new node with default values.

Remarks

Note

We recommend that you use the AddingNewNodeCommand property instead to initialize a new node with default values.

Bind a command to the InitNewNodeCommand property to maintain a clean MVVM pattern. The command works like an InitNewNode event handler and allows you to initialize a new node in a View Model.

The GridControl executes a command bound to the InitNewNodeCommand property in the following cases:

This command is executed after the GridControl adds a new record to your data source. Use a command bound to the InitNewNodeCommand property to initialize fields in the new record. For example, you can assign a unique value to the key field or assign default field values.

Refer to the following help topic for more information: Add and Remove Rows.

See Also