I have a RadzenTree and when the user selects an tree item, the state in the UI is correct(image1) also if the tree is collapsed(image2). But when the user reenters the page with RadzenTree the next time, the data are loaded from database but in the UI the user cannot recogonize that an item in the tree ist selected (image3), only after navigating to the selected tree item the tree the UI is properly displayed.(image4)
The tree cannot check items that are not yet expanded since these items does not exists. You need to expand all tree items if you want to see all checked items.
I tried this code, but always the whole tree is expanded. The Expanded property is ony set for nodes in the active path
public void LoadChildren(TreeExpandEventArgs args)
{
if (!(args.Value is IdNamePairTree idNamePairTree))
{
return;
}
I suggest you debug the code to see if args.Children.Expanded works as expected. By the way the screenshot does not show that the whole tree is expanded - the are collapsed nodes.
The screenshot shows how it should be, reality is that all nodes are expanded.
And when you look at the console out put you see the the Expanded variable is properly set.
Only on the nodes of the active path Globale Sales Taxonomie, Wälz- und Gleitlager, Kugellager and Rillenkugellager the Expanded variabel ist set to true.
So how is the proper way to do that? Or does the control not privide this?