Hi,
I use a TreeView object where the sub nodes of a node are loaded on demand when clicking the plus icon. Since I define a handler for the OnNodeExpanded event, it will be executed on server side then.
I also want to be able to expand a node and load its sub nodes when clicking the folder icon or the node text. When I detect on client side that the folder icon or the node text has been clicked I execute tree.Expand(node), where tree is the ObjectId of the TreeView object. I would expect in this situation that the server side event handler will be called, too, even if the node does not have any children. But it does not.
tree.Expand(node) set the Expanded property of the node to true and changes the plus icon to minus icon, but it does not lead to the loading of the sub nodes.
To make it run I now use tree.Refresh(args) method instead of tree.Expand(node)on client side. This calls the callback refresh event handler on server-side where I can start the "Expand" functionality. But I this confuse me. I have to call "Refresh" method if I want "Expand". Isn't there another way to get the OnNodeExpand event handler run on server side when executing Expand method on client side?
Regards,
Holger Wagner