Keep selected child after collapsing

When I have selected child node in the tree view and then collapse it's parent node the child node is deselected and parent node is selected instead. Is there a way how to keep the child selected when it's parent is being collapsed?


3 Replies

MA Manikanda Akash Munisamy Syncfusion Team November 13, 2024 12:09 PM UTC

Hi Ondrej Svoboda,
 
We have reviewed your requirement to keep the child node selected when its parent node is collapsed. By default, the selection moves to the parent node upon collapse. We have verified this behavior in the Framework’s TreeView, which exhibits the same. For reference, we have attached video recordings demonstrating this behavior in both controls.
 
If you have any questions or require further assistance, please feel free to reach out.

Regards,
Manikanda Akash

Attachment: TreeView_TreeViewAdv_18b9ddb9.zip


OS Ondrej Svoboda November 13, 2024 12:12 PM UTC

Hi,

can this behavior be somehow disabled?


Regards

Ondřej Svoboda



MA Manikanda Akash Munisamy Syncfusion Team November 14, 2024 12:17 PM UTC

Hi Ondrej Svoboda,
 
Based on our analysis, this is the intended behavior handled internally. When clicking on the expander icon to collapse the parent node, the selection moves from the child node to the parent node. Unfortunately, this behavior cannot be suppressed or restricted externally using any workaround.
 
If you have further questions, please feel free to reach out.

Regards,
Manikanda Akash

Loader.
Up arrow icon