Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
45
Tree view CSOM doesn't seem to be updating correctly
posted

I'm using a WebDataTree, which is being populated server-side. I want to use the CSOM to manipulate some of the nodes, but I'm running into a problem. I've been able to find a reference to the tree using JavaScript, but my issue is that the node collection is not fully populated when the page loads. For example, if I load 12 nodes into the tree in C#, and then look at the tree in JS, I find that even though the result of getNodes().get_length() is 12, if I try to access a node using .getNodes().getItem(i), then I find that the array of nodes is empty. Oddly, it seems that the reference to a given node will only enter the array of nodes when I mouse over it: so, if I mouse over all of the nodes in the tree, I can then find them using getItem(), but I can't expect the user to mouse over all of the nodes, of course.

If this makes a difference, it may be helpful to know that the WebDataTree exists within a WebExplorerBar, which itself resides within a WebSplitter: so the tree is inside an iframe.

Is there a reason that the CSOM model is at odds with the tree? Can I force them to synchronise?

Parents Reply Children
No Data