Skip to main content
A newer version of this page is available. .
All docs
V22.1

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.v22.1.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

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