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
Hi, I have question regarding the TreeDataGrid control with Multi-Selection enabled. The general setting is, that I have several parent nodes whose could have something between a hundred to several thousands child nodes. Due to performance reasons I use TreeDataGrid.
As in https://github.com/AvaloniaUI/Avalonia.Controls.TreeDataGrid/blob/master/docs/selection.md mentioned, I enable the Multi-Select by setting the bool SingleSelect = false. But it still behaved like SingleSelect = true. Then I assigned a method to ParameterSource.RowSelection.SelectionChanged event and selected the "deselected" nodes in the code behind (used the DeselectedIndexes property of the event arguments). This works out, but adds additional overhead when reselecting all previously selected nodes, especially when there are a few thousand nodes selected.
Is this a bug of TreeDataGrid or am I missing something? Any advice is welcome.
My ViewModel:
ParameterSource = new HierarchicalTreeDataGridSource<TreeViewNode>(_parameter)
{
Columns =
{
new HierarchicalExpanderColumn<TreeViewNode>(
new TextColumn<TreeViewNode, string>("Col", x => x.Name),x => x.Children)
},
};
ParameterSource.RowSelection!.SingleSelect = false;
My templated control, where ParameterSource is bound to:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi, I have question regarding the TreeDataGrid control with Multi-Selection enabled. The general setting is, that I have several parent nodes whose could have something between a hundred to several thousands child nodes. Due to performance reasons I use TreeDataGrid.
As in https://github.com/AvaloniaUI/Avalonia.Controls.TreeDataGrid/blob/master/docs/selection.md mentioned, I enable the Multi-Select by setting the bool
SingleSelect = false
. But it still behaved likeSingleSelect = true
. Then I assigned a method toParameterSource.RowSelection.SelectionChanged
event and selected the "deselected" nodes in the code behind (used theDeselectedIndexes
property of the event arguments). This works out, but adds additional overhead when reselecting all previously selected nodes, especially when there are a few thousand nodes selected.Is this a bug of TreeDataGrid or am I missing something? Any advice is welcome.
My ViewModel:
My templated control, where
ParameterSource
is bound to:Thanks in advance 🙂
Beta Was this translation helpful? Give feedback.
All reactions