This is a migrated thread and some comments may be shown as answers.

ItemDoubleClick

2 Answers 245 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 13 Mar 2015, 10:20 PM
This is a bit of a nit but I am using the RadTreeView and registering an event handler for ItemDoubleClick which I handle or not depending on the contents of the node. Apparently the default behavior of the double click in the tree view is to expand or collapse the node which is good. However if I handle the double click I would prefer that it NOT expand or collapse. I tried setting e.Handled = true in the double click event handler but that does not seem to make a difference. Any thoughts?

Thanks
Dave

2 Answers, 1 is accepted

Sort by
0
Accepted
Milena
Telerik team
answered on 16 Mar 2015, 08:59 AM
Hello David,

If you want to disable expanding/collapsing of the treeview item on double click you can use the IsExpandOnDblClickEnabled property of the treeview: 
<telerik:RadTreeView   IsExpandOnDblClickEnabled="False" .../>

As for the events - if you want to manipulate the expanding and collapsing of treeview items you can use Expand\Collapse Events of the treeview. 

I hope this information will help you and don't hesitate to write back if you have more questions.

Regards,
Milena
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
David
Top achievements
Rank 1
answered on 16 Mar 2015, 06:07 PM
I will confess it took me a bit to realize that I could simply disable it at the tree view and then handle it exactly the way I want in my double click handler but I finally got it. It is working fine now. Thanks
Tags
TreeView
Asked by
David
Top achievements
Rank 1
Answers by
Milena
Telerik team
David
Top achievements
Rank 1
Share this question
or