This question is locked. New answers and comments are not allowed.
I have a tree with load on demand data binding set up. The tree represents a file structure, and every time the user uses the page it's on to alter the file structure, I rebind the tree completely. (I do this to avoid problems outlined here) That works out fine and all, except for the fact that it causes the tree to completely collapse. This could be annoying for the user, so I wrote some code in my action method the tree data binding points to. This code takes in the root node of the previous structure (passed in through ajaxRequest() in javascript upon completion of a file system altering event) and basically attempts to set the "expanded" flag in every new node based on the flag of comparable nodes in the old structure.
To my dismay, I quickly discovered that apparently the node that is passed to my action controller by ajaxRequest() has its expanded flag always set to false. The same goes for all of its sub nodes. So apparently ajaxRequest() doesn't even bother to pass that information along. Is that the way its supposed to work? It would be pretty handy if that info got passed along, I gotta admit.
Thinking about it some more, I thought maybe I'd try and see if I could look at expanded flag of tree nodes in javascript, before I call ajaxRequest(). But I have no idea where to look. Where is that flag stored? Is it stored anywhere at all? Can I even get the current "expanded" flags of nodes in an existing tree, or am I out of luck in that department? If so, why? That seems like it'd be a useful feature.
To my dismay, I quickly discovered that apparently the node that is passed to my action controller by ajaxRequest() has its expanded flag always set to false. The same goes for all of its sub nodes. So apparently ajaxRequest() doesn't even bother to pass that information along. Is that the way its supposed to work? It would be pretty handy if that info got passed along, I gotta admit.
Thinking about it some more, I thought maybe I'd try and see if I could look at expanded flag of tree nodes in javascript, before I call ajaxRequest(). But I have no idea where to look. Where is that flag stored? Is it stored anywhere at all? Can I even get the current "expanded" flags of nodes in an existing tree, or am I out of luck in that department? If so, why? That seems like it'd be a useful feature.