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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

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

Thread ID:

Created:

Updated:

Platform:

Replies:

108454 Apr 22,2013 11:54 AM UTC Apr 25,2013 11:54 AM UTC ASP.NET Web Forms (Classic) 2
loading
Tags: Tools
Holger Wagner
Asked On April 22, 2013 11:54 AM UTC

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

Varalakshmi R.S [Syncfusion]
Replied On April 25, 2013 11:50 AM UTC

 

Varalakshmi R.S [Syncfusion]
Replied On 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,

http://asp.syncfusion.com/demos/ui/tools/TreeView/LoadOnDemand/cs/LoadOnDemand.aspx

 

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

 

Regards,

Varalakshmi

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;