Skip to main content

ITreeDataGridSource Interface

Definition

Assembly:Avalonia.Controls.TreeDataGrid
Package:Avalonia.Controls.TreeDataGrid

Represents a data source for a Avalonia.Controls.TreeDataGrid control.

public interface ITreeDataGridSource

Implements: INotifyPropertyChanged

Methods

NameDescription
ClearSortClears any sorting applied to the specified column.
DragDropRowsNo summary available.
GetModelChildrenGets the children of a model, if any.
SortByRequests to sort the source by the specified column.

ClearSort Method

Clears any sorting applied to the specified column.

public void ClearSort(Avalonia.Controls.Models.TreeDataGrid.IColumn column)

Parameters

column Avalonia.Controls.Models.TreeDataGrid.IColumn

The column.

DragDropRows Method

public void DragDropRows(Avalonia.Controls.ITreeDataGridSource source, System.Collections.Generic.IEnumerable<Avalonia.Controls.IndexPath> indexes, Avalonia.Controls.IndexPath targetIndex, Avalonia.Controls.TreeDataGridRowDropPosition position, Avalonia.Input.DragDropEffects effects)

Parameters

source Avalonia.Controls.ITreeDataGridSource

indexes System.Collections.Generic.IEnumerable<Avalonia.Controls.IndexPath>

targetIndex Avalonia.Controls.IndexPath

position Avalonia.Controls.TreeDataGridRowDropPosition

effects Avalonia.Input.DragDropEffects

GetModelChildren Method

Gets the children of a model, if any.

public System.Collections.Generic.IEnumerable<object> GetModelChildren(object model)

Parameters

model object

The model from which to get the children.

Returns

System.Collections.Generic.IEnumerable<object>

The children of the model. If there are no children, it will return an empty enumerable.

SortBy Method

Requests to sort the source by the specified column.

public bool SortBy(Avalonia.Controls.Models.TreeDataGrid.IColumn column, System.ComponentModel.ListSortDirection direction)

Parameters

column Avalonia.Controls.Models.TreeDataGrid.IColumn

The column.

direction System.ComponentModel.ListSortDirection

The sort direction.

Returns

bool

True if the sort could be performed; otherwise false.

Properties

NameDescription
ColumnsGets the columns to be displayed.
IsFilteredGets a value indicating whether the data source is filtered.
IsHierarchicalGets a value indicating whether the data source is hierarchical.
IsSortedGets a value indicating whether the data source is currently sorted.
ItemsGets the items in the data source.
RowsGets the rows to be displayed.
SelectionGets or sets the selection model.

Columns Property

Gets the columns to be displayed.

public Avalonia.Controls.Models.TreeDataGrid.IColumns Columns { get; set; }

IsFiltered Property

Gets a value indicating whether the data source is filtered.

public bool IsFiltered { get; set; }

IsHierarchical Property

Gets a value indicating whether the data source is hierarchical.

public bool IsHierarchical { get; set; }

IsSorted Property

Gets a value indicating whether the data source is currently sorted.

public bool IsSorted { get; set; }

Items Property

Gets the items in the data source.

public System.Collections.Generic.IEnumerable<object> Items { get; set; }

Rows Property

Gets the rows to be displayed.

public Avalonia.Controls.Models.TreeDataGrid.IRows Rows { get; set; }

Selection Property

Gets or sets the selection model.

public Avalonia.Controls.Selection.ITreeDataGridSelection Selection { get; set; }

Remarks

The selection mode of the control may be changed by setting this property to either an instance of Avalonia.Controls.Selection.TreeDataGridRowSelectionModel<T> for row selection, or Avalonia.Controls.Selection.TreeDataGridCellSelectionModel<T> for cell selection.

Events

NameDescription
SortedOccurs after sorting has changed on the data source.

Sorted Event

Occurs after sorting has changed on the data source.

public event Action Sorted