Skip to main content
A newer version of this page is available.
All docs
V20.2

TreeListView.AddNewNode(TreeListNode) Method

Adds a new node to the TreeListView‘s underlying datasource.

Namespace: DevExpress.Xpf.Grid

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

NuGet Packages: DevExpress.WindowsDesktop.Wpf.Grid.Core, DevExpress.Wpf.Grid.Core

Declaration

public TreeListNode AddNewNode(
    TreeListNode parentNode
)

Parameters

Name Type Description
parentNode TreeListNode

A parent node.

Returns

Type Description
TreeListNode

A new node.

Remarks

Use the AddNewNode method to add a new node to the view’s underlying datasource. The View immediately reflects any changes made to the datasource and focuses the new node.

The AddNewNode method is only available for datasources which support the following interfaces:

  • IBindingList
  • ICollectionView
  • INotifyCollectionChanged

When a new node is added, the datasource may initialize some values (key fields, for instance). Record initialization can also be performed manually by handling the TreeListView.InitNewRow event.

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

See Also