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.

Disable Expand/Collapse Right Click Tree

Thread ID:

Created:

Updated:

Platform:

Replies:

78661 Dec 22,2008 05:07 PM Dec 23,2008 10:19 AM ASP.NET Web Forms (Classic) 1
loading
Tags: Tools
Todd Dill
Asked On December 22, 2008 05:07 PM

How can I disable expanding/collapsing nodes when the treeview is clicked? I tried to handle ClientSideOnNodeCollapse and ClientSideOnNodeExpand by returning false if MouseButtonPressed equals right, but it still collapses and expands. I also handle ClientSideOnNodeSelect and ClientSideOnContextMenu.

Thanks.


Pradeep N [Syncfusion]
Replied On December 23, 2008 10:19 AM

Hi Todd,

Thank you for your interest in Syncfusion Products.

The tree view nodes can be disabled using SetDisabled(true)Client side API.

Below i added a code snippet that disables the node on ClientSideOnNodeSelect(this) event on right click. We can select the nodes on Left Click.



function Expand(node)
{
var nodeitem = _sfTreeView1.FindNodeByID(node.ID);

if(node.MouseButtonPressed.Right==true)
nodeitem.SetDisabled(true);

}



Please let me know if this snippet helps you.

Thanks,
Pradeep,




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.

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.

;