We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

TreeView: client side Expand() function does not trigger server-side ExpandNode event

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?

Holger Wagner

2 Replies

VR Varalakshmi R.S Syncfusion Team April 25, 2013 11:50 AM UTC


VR Varalakshmi R.S Syncfusion Team April 25, 2013 11:54 AM UTC

Hi Holger,


Thanks for your interest in Syncfusion products.


We are able to expand the TreeView nodes on either clicking folder icon or node text. Please refer the below given online sample link to know the details,



And, invoking Expand() will not trigger expand event since no call back is processed. So, kindly use “Refresh” method to raise post.




Live Chat Icon For mobile
Up arrow icon