Skip to main content

TreeDataGridItemsResetEventArgs Class

Definition​

Assembly:Avalonia.Controls.TreeDataGrid
Package:Avalonia.Controls.TreeDataGrid
public class TreeDataGridItemsResetEventArgs

Inheritance: EventArgs -> TreeDataGridItemsResetEventArgs

Remarks​

This event is raised when a collection in the hierarchical data structure is reset, such as when the collection is cleared or replaced with a new collection.

The event provides information about which part of the hierarchical structure was reset through the Avalonia.Controls.Selection.TreeDataGridItemsResetEventArgs.ParentIndex property, allowing handlers to determine whether the entire source was reset or just a subtree within the hierarchy.

Constructors​

TreeDataGridItemsResetEventArgs Constructor​

Provides data for the Avalonia.Controls.Selection.TreeDataGridSelectionModel.SourceReset event.

public TreeDataGridItemsResetEventArgs(Avalonia.Controls.IndexPath parentIndex)

Parameters​

parentIndex Avalonia.Controls.IndexPath

Remarks​

This event is raised when a collection in the hierarchical data structure is reset, such as when the collection is cleared or replaced with a new collection.

The event provides information about which part of the hierarchical structure was reset through the Avalonia.Controls.Selection.TreeDataGridItemsResetEventArgs.ParentIndex property, allowing handlers to determine whether the entire source was reset or just a subtree within the hierarchy.

Properties​

NameDescription
ParentIndexGets the index path to the parent item whose children collection was reset.

ParentIndex Property​

Gets the index path to the parent item whose children collection was reset.

public Avalonia.Controls.IndexPath ParentIndex { get; set; }

Value​

An Avalonia.Controls.IndexPath identifying the parent item in the hierarchy.

Remarks​

When the root collection is reset, this property will be an empty path.

When a child collection is reset, this property will contain the path to the parent item containing that child collection.

This information is useful for determining which part of the selection may have been affected by the reset and may need to be updated or restored.