Back to Devexpress

TreeListView.InitNewNodeCommand Property

wpf-devexpress-dot-xpf-dot-grid-dot-treelistview-7cabe82c.md

latest2.9 KB
Original Source

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.v25.2.dll

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

csharp
public ICommand<InitNewNodeArgs> InitNewNodeCommand { get; set; }
vb
Public Property InitNewNodeCommand As ICommand(Of InitNewNodeArgs)

Property Value

TypeDescription
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

InitNewRowCommand

AddingNewNodeCommand

TreeListView Class

TreeListView Members

DevExpress.Xpf.Grid Namespace