Hello,
The setup:
- RadTreeView bound to an hierarchy.
- SelectMode is Multiselect
- Each node has an IsSelected property, RadTreeViewItem is bound to it using a style.
And one of requirements is that when a child is selected then all his parents should be selected too. And we've run into a problem implementing it.
Reproducing the problem:
- Expand parent node without selecting
- Click on a child
- The Child is selected and his parent too
- Click again on child
At this moment parent is unselected by the TreeView, while child is still selected.
Definition of IsSelected property:
When clicking second time on a child, the IsSelected setter isn't called on a child, but sets to false for parent.
Basically I'd like to keep a visual "selection chain" from children to parent nodes. Anything special should be done in order to keep parent nodes selected?
Thanks
The setup:
- RadTreeView bound to an hierarchy.
- SelectMode is Multiselect
- Each node has an IsSelected property, RadTreeViewItem is bound to it using a style.
And one of requirements is that when a child is selected then all his parents should be selected too. And we've run into a problem implementing it.
Reproducing the problem:
- Expand parent node without selecting
- Click on a child
- The Child is selected and his parent too
- Click again on child
At this moment parent is unselected by the TreeView, while child is still selected.
Definition of IsSelected property:
public bool IsSelected{ get { return isSelected; } set { if (value == isSelected) return; isSelected = value; NotifyOfPropertyChange(() => IsSelected); if (Parent != null) Parent.IsSelected = isSelected; }}When clicking second time on a child, the IsSelected setter isn't called on a child, but sets to false for parent.
Basically I'd like to keep a visual "selection chain" from children to parent nodes. Anything special should be done in order to keep parent nodes selected?
Thanks