I am using a TreeViewAdv in a project and I need to set the selected value through C#. I can set the selection and find the TreeViewItemAdv that contains the object I am looking for through the use of
TreeViewItemAdv.ItemContainerGenerator.ContainerFromItem(o). Everything works fine if I accessed the node previously.
The problem I am encountering is that the TreeViewItemAdv does not seem to be created unless you accessed the node, event if the TreeViewAdv.IsVirtualizing is false. I also tried setting the TreeViewItemAdv.IsLoadOnDemand to false and in both cases, it does not solve the problem. I can move through the items fine, but when I try to get the container through the ContainerFromItem function, it returns null, as if the TreeViewItem had not been created.
Is this a bug, or is there another way to get at the TreeViewItemAdv?
KRKarthick Ravichandran Syncfusion Team July 18, 2013 10:32 AM UTC
Thanks for using Syncfusion products.
We have created a sample to select the treeviewitemadv which
retrieved from container generator, please check with the sample in the below
location. If you still face any problem, please revert us by modifying the
sample based on your application along with replication procedure. This would
be helpful for us to serve you.