You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
publicclassMainViewModel:ViewModelBase{publicAvaloniaList<Item>Items{get;}=new();publicHierarchicalTreeDataGridSource<Item>Source{get;}publicReactiveCommand<Unit,Unit>Command{get;}publicMainViewModel(){Source=new(Items){Columns={newHierarchicalExpanderColumn<Item>(newTextColumn<Item,int>("N", o =>o.N), o =>o.Chilren){SortDirection=ListSortDirection.Ascending}}};Command=ReactiveCommand.Create(()=>Items.Add(new()));}}publicclassItem{publicintN{get;}publicAvaloniaList<Item>Chilren{get;}=[];publicItem()=>N=Random.Shared.Next(10);}
I expect sorting to work according to SortDirection.
Environment
OS: Windows 11
Avalonia-Version: 11.0.10
TreeDataGrid-Version: 11.0.2
Additional context
I've tried to set SortDirection after 5s delay after window is shown. The column header will show arrow, but no sorting occurs. I guess this public property is used internally to toggle displaying of arrow, but then how do I force sorting?
I guess simulating mouse click on column header is a workaround, but after quick research I am unable to find anything what can help me to build such workaround.
The text was updated successfully, but these errors were encountered:
Describe the bug
I am setting column
SortDirection
in code, but the sorting is not happening. Sorting seems to only works if I click column header.To Reproduce
Avalonia.Controls.TreeDataGrid
nuget.Repro
App.axaml
MainViewModel.cs
MainView.axaml
Expected behavior
I expect sorting to work according to
SortDirection
.Environment
Additional context
I've tried to set
SortDirection
after 5s delay after window is shown. The column header will show arrow, but no sorting occurs. I guess thispublic
property is used internally to toggle displaying of arrow, but then how do I force sorting?I guess simulating mouse click on column header is a workaround, but after quick research I am unable to find anything what can help me to build such workaround.
The text was updated successfully, but these errors were encountered: