Welcome to the Blazor feedback portal. We’re happy you’re here! If you have feedback on how to improve the Blazor, we’d love to hear it!>
Thanks for joining our community and helping improve Syncfusion products!
Hi!
I have a TreeView with DataSource bound to Local Hierarchical data, similar to what is shown in
https://blazor.syncfusion.com/documentation/treeview/data-binding#hierarchical-data
If, on initializing the TreeView, I set one of the parent nodes as Expanded = true (as is done for Folder Id 02 "Others" in the aforementioned example), it works fine (the parent node is show as expanded).
However, if I try to rebind the DataSource by creating a new item List and one of the parent nodes has its Expanded property set to true, it is shown as collapsed anyway.
The only way I managed to expand the parent node after rebinding the DataSource was by invoking
ExpandAllAsync() method (AFTER invoking StateHasChanged()), but it is a rather hacky solution, IMO.
Can you please check and advise?
Best regards,
Marco.