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

Double click and selection problem

Thread ID:





70447 Dec 11,2007 05:59 PM UTC Dec 13,2007 10:28 PM UTC WinForms 1
Tags: Diagram
Asked On December 11, 2007 05:59 PM UTC

Hello there,
I have TreeViewAdv in wich is not allowed multiselection. And I have such for example tree:
+ mainTreeNode1
- mainTreeNode2
In handler of DoubleClick event i am executing some action with selected node.
When i selected childNode1 and perfomed double click on "+" of mainTreeNode1 in DoubleClick handler childNode1 is selected in tree, but in this situation i not want perfomed some action with selected node, such as i double clicked on "+", not on selected node.
Please help how to prohibit executing some action with selected node if i double clicked on "+" of another root node.

J.Nagarajan [Syncfusion]
Replied On December 13, 2007 10:28 PM UTC

Hi Alexey ,

You can show the selection of the child node of a parentnode when you double click on another parent node. To achieve this behavior, you have to use Background property of the child node to show the selection. Please refer to the following code snippet.

foreach (TreeNodeAdv treenode in treeViewAdv1.Nodes)
foreach (TreeNodeAdv treenode1 in treenode.Nodes)
if (treenode1.Text == "Node4")
treenode1.Background = new Syncfusion.Drawing.BrushInfo(System.Drawing.Color.Wheat);

The attached sample demonstrates this behavior completely.


Please refer to it and let me know if you have any questions.



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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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