TreeDataGrid 11.3.12.8-preview.3
See the version list below for details.
dotnet add package TreeDataGrid --version 11.3.12.8-preview.3
NuGet\Install-Package TreeDataGrid -Version 11.3.12.8-preview.3
<PackageReference Include="TreeDataGrid" Version="11.3.12.8-preview.3" />
<PackageVersion Include="TreeDataGrid" Version="11.3.12.8-preview.3" />
<PackageReference Include="TreeDataGrid" />
paket add TreeDataGrid --version 11.3.12.8-preview.3
#r "nuget: TreeDataGrid, 11.3.12.8-preview.3"
#:package TreeDataGrid@11.3.12.8-preview.3
#addin nuget:?package=TreeDataGrid&version=11.3.12.8-preview.3&prerelease
#tool nuget:?package=TreeDataGrid&version=11.3.12.8-preview.3&prerelease
TreeDataGrid for Avalonia
Introduction
TreeDataGrid is a control for the Avalonia UI framework which displays hierarchical and tabular data together in a single view. It is a combination of a TreeView and DataGrid control.
The control has two modes of operation:
- Hierarchical: data is displayed in a tree with optional columns
- Flat: data is displayed in a 2D table, similar to other
DataGridcontrols
An example of TreeDataGrid displaying hierarchical data:
An example of TreeDataGrid displaying flat data:
Current Status
We accept all issues and pull requests but we answer and review only pull requests and issues that are high quality and align with project scope.
Quick Start
For new Avalonia applications, install the platform-specific package:
dotnet add package TreeDataGrid.Controls.Avalonia
Or add a package reference:
<ItemGroup>
<PackageReference Include="TreeDataGrid.Controls.Avalonia" Version="x.y.z" />
</ItemGroup>
Add the theme to App.axaml:
<Application xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="AvaloniaApplication.App">
<Application.Styles>
<FluentTheme/>
<StyleInclude Source="avares://TreeDataGrid.Avalonia/Themes/Fluent.axaml"/>
</Application.Styles>
</Application>
Basic Usage
Flat mode
using System.Collections.ObjectModel;
using Avalonia.Controls.Models.TreeDataGrid;
public class Person
{
public string? FirstName { get; set; }
public string? LastName { get; set; }
public int Age { get; set; }
}
public class MainWindowViewModel
{
private readonly ObservableCollection<Person> _people = new()
{
new() { FirstName = "Eleanor", LastName = "Pope", Age = 32 },
new() { FirstName = "Jeremy", LastName = "Navarro", Age = 74 },
};
public FlatTreeDataGridSource<Person> Source { get; }
public MainWindowViewModel()
{
Source = new FlatTreeDataGridSource<Person>(_people)
{
Columns =
{
new TextColumn<Person, string>("First Name", x => x.FirstName),
new TextColumn<Person, string>("Last Name", x => x.LastName),
new TextColumn<Person, int>("Age", x => x.Age),
},
};
}
}
Hierarchical mode
using System.Collections.ObjectModel;
using Avalonia.Controls.Models.TreeDataGrid;
public class Person
{
public string? FirstName { get; set; }
public string? LastName { get; set; }
public int Age { get; set; }
public ObservableCollection<Person> Children { get; } = new();
}
public class MainWindowViewModel
{
private readonly ObservableCollection<Person> _people = new();
public HierarchicalTreeDataGridSource<Person> Source { get; }
public MainWindowViewModel()
{
Source = new HierarchicalTreeDataGridSource<Person>(_people)
{
Columns =
{
new HierarchicalExpanderColumn<Person>(
new TextColumn<Person, string>("First Name", x => x.FirstName),
x => x.Children),
new TextColumn<Person, string>("Last Name", x => x.LastName),
new TextColumn<Person, int>("Age", x => x.Age),
},
};
}
}
Bind in XAML (both modes):
<TreeDataGrid Source="{Binding Source}" />
Build and Package
Build, test, and pack the complete solution:
dotnet restore Avalonia.Controls.TreeDataGrid.slnx
dotnet build Avalonia.Controls.TreeDataGrid.slnx -c Release --no-restore
dotnet test tests/Avalonia.Controls.TreeDataGrid.Tests/Avalonia.Controls.TreeDataGrid.Tests.csproj -c Release
dotnet pack Avalonia.Controls.TreeDataGrid.slnx -c Release --no-build -o artifacts/packages
python3 build/verify-package-layout.py artifacts/packages
Packages are generated in artifacts/packages (.nupkg and .snupkg). The
solution produces TreeDataGrid.Core, TreeDataGrid.Controls.Avalonia, and the compatibility
TreeDataGrid package. Existing applications may keep TreeDataGrid and its
avares://Avalonia.Controls.TreeDataGrid/ theme URI. Do not reference both UI
packages in one application. See Avalonia package identity.
Build Documentation
Build docs locally:
./build-docs.sh
Serve docs locally:
./serve-docs.sh
Generated docs output is written to _site.
Getting Started
- Installation
- Creating a flat
TreeDataGrid - Creating a hierarchical
TreeDataGrid - Supported column types
- Selection
License
- Main project license: licence.md
- Preserved original upstream license: LICENSE-AVALONIA
Framework-neutral ViewModels
Use TreeDataGrid.Core for ViewModel-owned sources, columns, sorting, selection and expansion without an Avalonia dependency. New views should use the TreeDataGrid.Controls.Avalonia package; existing TreeDataGrid consumers remain supported. See migration and ownership.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 is compatible. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net5.0
- Avalonia (>= 11.0.0)
- System.Reactive (>= 5.0.0)
- TreeDataGrid.Core (>= 11.3.12.8-preview.3)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on TreeDataGrid:
| Package | Downloads |
|---|---|
|
OneWare.Essentials
Essentials Needed for One Ware Plugin Development |
|
|
Material.Avalonia.TreeDataGrid
TreeDataGrid styles library of Material.Avalonia. |
GitHub repositories (1)
Showing the top 1 popular GitHub repositories that depend on TreeDataGrid:
| Repository | Stars |
|---|---|
|
one-ware/OneWare
Next Generation IDE for Electronics Development
|
| Version | Downloads | Last Updated |
|---|---|---|
| 12.0.0.7 | 0 | 9/5/2026 |
| 12.0.0.7-preview.5 | 0 | 9/5/2026 |
| 12.0.0.7-preview.4 | 52 | 9/4/2026 |
| 12.0.0.7-preview.3 | 36 | 9/4/2026 |
| 12.0.0.7-preview.2 | 53 | 9/4/2026 |
| 12.0.0.7-preview.1 | 33 | 9/3/2026 |
| 12.0.0.6 | 749 | 8/14/2026 |
| 12.0.0.5 | 76 | 8/14/2026 |
| 12.0.0.4 | 349 | 8/7/2026 |
| 12.0.0.3 | 79 | 8/7/2026 |
| 11.3.12.8 | 0 | 9/5/2026 |
| 11.3.12.8-preview.5 | 0 | 9/5/2026 |
| 11.3.12.8-preview.4 | 73 | 9/4/2026 |
| 11.3.12.8-preview.3 | 43 | 9/4/2026 |
| 11.3.12.8-preview.2 | 45 | 9/4/2026 |
| 11.3.12.8-preview.1 | 49 | 9/3/2026 |
| 11.3.12.7 | 423 | 8/14/2026 |
| 11.3.12.6 | 68 | 8/14/2026 |
| 11.3.12.5 | 160 | 8/7/2026 |
| 11.3.12.4 | 62 | 8/7/2026 |