Skip to main content

TreeDataGridSelectionChangedEventArgs Class

Definition

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

Inheritance: EventArgs -> TreeDataGridSelectionChangedEventArgs

Remarks

This is the unified base class for selection change events in TreeDataGrid, used by both row and cell selection models. It provides row-level indexes and items, as well as cell-level indexes that expand rows across columns.

Properties

NameDescription
DeselectedCellIndexesGets the cell indexes of the cells that were removed from the selection.
DeselectedIndexesGets the row indexes of the items that were removed from the selection.
DeselectedItemsGets the items that were removed from the selection.
SelectedCellIndexesGets the cell indexes of the cells that were added to the selection.
SelectedIndexesGets the row indexes of the items that were added to the selection.
SelectedItemsGets the items that were added to the selection.

DeselectedCellIndexes Property

Gets the cell indexes of the cells that were removed from the selection.

public System.Collections.Generic.IReadOnlyList<Avalonia.Controls.CellIndex> DeselectedCellIndexes { get; set; }

Remarks

For row selection, this expands deselected rows across all columns. For cell selection, this contains the specific deselected cells.

DeselectedIndexes Property

Gets the row indexes of the items that were removed from the selection.

public System.Collections.Generic.IReadOnlyList<Avalonia.Controls.IndexPath> DeselectedIndexes { get; set; }

Remarks

When items are removed from the data source, their indexes are no longer valid and will not appear in this collection. Use Avalonia.Controls.Selection.TreeDataGridSelectionChangedEventArgs.DeselectedItems to identify removed items in that case.

DeselectedItems Property

Gets the items that were removed from the selection.

public System.Collections.Generic.IReadOnlyList<object> DeselectedItems { get; set; }

Remarks

When items are removed from the data source, their indexes are no longer valid but the items themselves are still available in this collection.

SelectedCellIndexes Property

Gets the cell indexes of the cells that were added to the selection.

public System.Collections.Generic.IReadOnlyList<Avalonia.Controls.CellIndex> SelectedCellIndexes { get; set; }

Remarks

For row selection, this expands selected rows across all columns. For cell selection, this contains the specific selected cells.

SelectedIndexes Property

Gets the row indexes of the items that were added to the selection.

public System.Collections.Generic.IReadOnlyList<Avalonia.Controls.IndexPath> SelectedIndexes { get; set; }

SelectedItems Property

Gets the items that were added to the selection.

public System.Collections.Generic.IReadOnlyList<object> SelectedItems { get; set; }