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
When opening couple of first level node rows of a hierarchical tree data grid that contains multiple levels of other children nodes and the whole grid has only one columns (like a fake TreeView), the first level rows in between the already expanded other rows can't be selected and the top one is selected instead.
For example, if I expand first level rows from 1 to 5, they are easily selectable by the expandable arrow. But if I click anywhere else e.g. a Stack panel that defines the layout of each row, the row 2 or 3 or 4 can't be selected.
To Reproduce
Create Hierarchical data grid with at least 10 rows, only 1 column and multiple levels of children nodes. This data grid must be created as below:
var source = new HierarchicalTreeDataGridSource<IGridLayerNode>(GridLayerNodes)
{
Columns =
{
new HierarchicalExpanderColumn<IGridLayerNode>(
new TemplateColumn<IGridLayerNode>(
"Name",
"FileNameCell",
null,
new GridLength(1, GridUnitType.Star)),
x => x.Nodes)
}
};
source.RowSelection!.SingleSelect = false;
Source = source;
Source.Selection = new TreeDataGridCellSelectionModel<IGridLayerNode>(source) { SingleSelect = false };
Then click on first 5 main layers nodes to unfold them with their children....then try to click for example 2nd or 3rd main layer. It will selected first layer or children of first layer instead. Seems like some hidden collision bug.
Expected behavior
When all main layer rows are expanded with their children, I should be able to easily selected any main layer row.
Avalonia version
11.2
OS
Windows
Additional context
No response
The text was updated successfully, but these errors were encountered:
Also want to add that it happens in the nested children too.
For example. Fully expand first main node(about 5 levels of nested children nodes), then when I go back collapsing each level, at level 1 (meaning children of the main node), I can only select first child. Clicking on other children will select some other lower main nodes.
Test it with 10s or 100s of nodes, not just 1 child under each node.
I've found out that the root of the cause is the line from the Source creation
'Source.Selection = new TreeDataGridCellSelectionModel(source) { SingleSelect = false };'
this however is necessary in order to have a track for 'SelectedNode' where 'SelectionChanged' is triggered if you change a row.
Removing that code makes the selection fine, however the SelectionChanged event stops working.
I'm not sure if that selection is working as intended but that looks definitely like a bug.
Describe the bug
When opening couple of first level node rows of a hierarchical tree data grid that contains multiple levels of other children nodes and the whole grid has only one columns (like a fake TreeView), the first level rows in between the already expanded other rows can't be selected and the top one is selected instead.
For example, if I expand first level rows from 1 to 5, they are easily selectable by the expandable arrow. But if I click anywhere else e.g. a Stack panel that defines the layout of each row, the row 2 or 3 or 4 can't be selected.
To Reproduce
Create Hierarchical data grid with at least 10 rows, only 1 column and multiple levels of children nodes. This data grid must be created as below:
XAML:
Then click on first 5 main layers nodes to unfold them with their children....then try to click for example 2nd or 3rd main layer. It will selected first layer or children of first layer instead. Seems like some hidden collision bug.
Expected behavior
When all main layer rows are expanded with their children, I should be able to easily selected any main layer row.
Avalonia version
11.2
OS
Windows
Additional context
No response
The text was updated successfully, but these errors were encountered: