ITreeDataGridSource Interface
Definition
Represents a data source for a Avalonia.Controls.TreeDataGrid control.
public interface ITreeDataGridSource
Methods
| Name | Description |
|---|---|
| ClearSort | Clears any sorting applied to the specified column. |
| DragDropRows | No summary available. |
| GetModelChildren | Gets the children of a model, if any. |
| SortBy | Requests 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
| Name | Description |
|---|---|
| Columns | Gets the columns to be displayed. |
| IsFiltered | Gets a value indicating whether the data source is filtered. |
| IsHierarchical | Gets a value indicating whether the data source is hierarchical. |
| IsSorted | Gets a value indicating whether the data source is currently sorted. |
| Items | Gets the items in the data source. |
| Rows | Gets the rows to be displayed. |
| Selection | Gets 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
| Name | Description |
|---|---|
| Sorted | Occurs after sorting has changed on the data source. |
Sorted Event
Occurs after sorting has changed on the data source.
public event Action Sorted