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. (Last updated on : November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Disable Expand/Collapse Right Click Tree

Thread ID:

Created:

Updated:

Platform:

Replies:

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

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 03:19 PM UTC

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.

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

;