wpf-devexpress-dot-xpf-dot-grid-dot-treelistview-7cabe82c.md
Gets or sets a command that allows you to initialize a new node with default values.
Namespace : DevExpress.Xpf.Grid
Assembly : DevExpress.Xpf.Grid.v25.2.dll
NuGet Package : DevExpress.Wpf.Grid.Core
public ICommand<InitNewNodeArgs> InitNewNodeCommand { get; set; }
Public Property InitNewNodeCommand As ICommand(Of InitNewNodeArgs)
| Type | Description |
|---|---|
| ICommand<InitNewNodeArgs> |
A command that allows you to initialize a new node with default values.
|
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