I would like to know how I can expand/collapse a single node in the treeview by code. Can anybody help me? And also if there is a chance to get notified in case of expanse/collapse (OnExpand event)
Specifically, see that the Expand() and Collapse() methods have no .NET MAUI equivalent right now. The same is also true for the ItemExpanded and ItemCollapsed events.
Note that this is the first iteration of the control and we are adding more features as time goes on. To help prioritize certain features over others, I have opened the following dedicated Feature Requests:
Note: You are already subscribed to the items, and I have added your upvote, so there is no further action needed on your part.
As for an alternate approach for the events, you can consider use the ItemTapped event and read the value of the node to gather needed information => .NET MAUI TreeView Documentation - Events.
Regards,
Lance | Manager Technical Support
Progress Telerik
I already encountered that there is no Expand method. But maybe there is a workaround by directly modifiyng the visible elements? If I define Items in XAML I can set them to expanded style. If this is possible, it should somehow be possible in code to I think?
Didi
Telerik team
commented on 24 Jul 2023, 09:21 AM
Hi Sven,
There are methods for expanding/collapsing all items, not a single item. I see that you have logged two features for this: