HierarchicalTreeDataGridSource<TModel> Class
Definition
A data source for a Avalonia.Controls.TreeDataGrid which displays a hierarchial tree where each row may have multiple columns.
public class HierarchicalTreeDataGridSource<TModel>
Constructors
| Name | Description |
|---|---|
| HierarchicalTreeDataGridSource<TModel> (2 overloads) | No summary available. |
HierarchicalTreeDataGridSource<TModel> overloads
HierarchicalTreeDataGridSource<TModel> Constructor
public HierarchicalTreeDataGridSource<TModel>(System.Collections.Generic.IEnumerable<TModel> items)
Parameters
items System.Collections.Generic.IEnumerable<TModel>
HierarchicalTreeDataGridSource<TModel> Constructor
Initializes a new instance of the Avalonia.Controls.HierarchicalTreeDataGridSource<T> class with a single root item.
public HierarchicalTreeDataGridSource<TModel>(TModel item)
Parameters
item TModel
The root item to display.
Methods
| Name | Description |
|---|---|
| ClearSort | No summary available. |
| Collapse | Collapses the row at the specified index. |
| CollapseAll | Collapses all rows. |
| Dispose | No summary available. |
| Expand | Expands the row at the specified index. |
| ExpandAll | Expands all rows. |
| ExpandCollapseRecursive (2 overloads) | No summary available. |
| Filter | No summary available. |
| RefreshFilter | Refreshes the current filter applied to the collection. |
| Sort | No summary available. |
| SortBy | No summary available. |
| TryGetModelAt | No summary available. |
ClearSort Method
public void ClearSort(Avalonia.Controls.TreeDataGridColumn column)
Parameters
Collapse Method
Collapses the row at the specified index.
public void Collapse(Avalonia.Controls.IndexPath index)
Parameters
index Avalonia.Controls.IndexPath
The index path of the row to collapse.
CollapseAll Method
Collapses all rows.
public void CollapseAll()
Dispose Method
public void Dispose()
Expand Method
Expands the row at the specified index.
public void Expand(Avalonia.Controls.IndexPath index)
Parameters
index Avalonia.Controls.IndexPath
The index path of the row to expand.
ExpandAll Method
Expands all rows.
public void ExpandAll()
ExpandCollapseRecursive overloads
ExpandCollapseRecursive Method
public void ExpandCollapseRecursive(Avalonia.Controls.Models.ITreeDataGridRowModel row, Func<TModel, bool> predicate)
Parameters
row Avalonia.Controls.Models.ITreeDataGridRowModel
predicate Func<TModel, bool>
ExpandCollapseRecursive Method
public void ExpandCollapseRecursive(Func<TModel, bool> predicate)
Parameters
predicate Func<TModel, bool>
Filter Method
public void Filter(Func<TModel, bool> filter)
Parameters
filter Func<TModel, bool>
RefreshFilter Method
Refreshes the current filter applied to the collection.
public void RefreshFilter()
Remarks
Call this method if the filter predicate depends on external state which has changed, to re-apply the filter to the collection.
Sort Method
public void Sort(Comparison<TModel> comparison)
Parameters
comparison Comparison<TModel>
SortBy Method
public bool SortBy(Avalonia.Controls.TreeDataGridColumn column, System.ComponentModel.ListSortDirection direction)
Parameters
column Avalonia.Controls.TreeDataGridColumn
direction System.ComponentModel.ListSortDirection
Returns
bool
TryGetModelAt Method
public bool TryGetModelAt(Avalonia.Controls.IndexPath index, TModel& result)
Parameters
index Avalonia.Controls.IndexPath
result TModel&
Returns
bool
Properties
| Name | Description |
|---|---|
| Columns | Gets the columns to be displayed. |
| IsFiltered | No summary available. |
| IsHierarchical | No summary available. |
| IsSorted | No summary available. |
| Items | No summary available. |
| Rows | No summary available. |
| Selection | No summary available. |
Columns Property
Gets the columns to be displayed.
public Avalonia.Controls.TreeDataGridColumns Columns { get; set; }
IsFiltered Property
public bool IsFiltered { get; set; }
IsHierarchical Property
public bool IsHierarchical { get; set; }
IsSorted Property
public bool IsSorted { get; set; }
Items Property
public System.Collections.Generic.IEnumerable<TModel> Items { get; set; }
Rows Property
public Avalonia.Controls.TreeDataGridRows Rows { get; set; }
Selection Property
public Avalonia.Controls.Selection.TreeDataGridSelectionModel Selection { get; set; }
Events
| Name | Description |
|---|---|
| RowCollapsed | Occurs when a hierarchical row is collapsed. |
| RowCollapsing | Occurs when a hierarchical row is about to collapse. |
| RowExpanded | Occurs when a row in the hierarchical data structure is expanded. |
| RowExpanding | Occurs when a row in the hierarchical data structure is about to expand. |
RowCollapsed Event
Occurs when a hierarchical row is collapsed.
public event EventHandler<Avalonia.Controls.Models.TreeDataGridRowModelEventArgs> RowCollapsed
RowCollapsing Event
Occurs when a hierarchical row is about to collapse.
public event EventHandler<Avalonia.Controls.Models.TreeDataGridRowModelEventArgs> RowCollapsing
RowExpanded Event
Occurs when a row in the hierarchical data structure is expanded.
public event EventHandler<Avalonia.Controls.Models.TreeDataGridRowModelEventArgs> RowExpanded
RowExpanding Event
Occurs when a row in the hierarchical data structure is about to expand.
public event EventHandler<Avalonia.Controls.Models.TreeDataGridRowModelEventArgs> RowExpanding