With a databound tree, the creation of node objects is deferred until its parent becomes visible. This makes sense to be the default behavior, but can the lazy instantiation be disabled?
I would like to walk the tree up and down to apply checked state logic but find I cannot follow the Nodes collection down to the leaf nodes unless the tree is expanded. Further, as soon as a new item is added to the datasource I need InitializeDataNode to fire in order to apply an initial checked state.
Is there a property I have overlooked to turn off deferred node creation?
I'm on the latest and greatest of 11.2.
Thanks!
Hello,
I have tried to reproduce your issue on my end, so I have created UltraTree and also have applied a logic, which iterate UltraTree's nodes in order to determine check state of child/parent nodes, and I am able to access child nodes without expanding its parent. Please see attached video,
when I click onto ultraButton1, it sets ultraTree1.Nodes[0].Nodes[0].Nodes[0].CheckedState = CheckState.Checked;, which mean that the very first node should changes its state. Change the checked state of 3-th node of first level and after I expand this node, its child nodes are correctly checked. Also I am attaching the sample which I have created for my tests.
Please let me know if you have any further questions or if I am missing something
Thank you for the prompt reply. It looks like the issue is unique to the custom IBindingListView I'm using, which more than likely means the issue lies within the datasource itself or the usage thereof.