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

double click to expand node not rename

3 Answers 147 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
ali
Top achievements
Rank 1
ali asked on 24 Feb 2009, 04:39 PM
Hi,

How can I alter the behaviour of the treeview so that when double clicked instead of renaming, the node would expand? And therefore to rename, you would need to click twice rather than double-click.

It does not seem intuitive and is contrary to the way the Windows folders behave.

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 25 Feb 2009, 07:48 AM
Hi Ali,

I tried the client side code in order to achieve the functionality of expanding the node when double-cliking, by attaching the OnClientDoubleClick() handler to RadTreeView. Set the property AllowNodeEditing="true" of RadTreeView as well.

JavaScript:
<script type="text/javascript"
function OnClientDoubleClick(sender, args) 
    var node = args.get_node(); 
    node.set_allowEdit(false); 
    node.toggle(); 
    node.set_allowEdit(true); 
</script> 

Thanks,
Shinu.
0
ali
Top achievements
Rank 1
answered on 25 Feb 2009, 10:43 AM
Hi that still doesnt work as expected.

Although now when you double-click the text it expands and contracts, at the same time, it goes into edit mode. When in edit mode, double clicking on the image does not expand and contract.

Requirements are as follows:
1)needs to expand and contract when image or text is clicked upon. currently does not expand when image is clicked on.
2)only go into edit mode when clicked on twice rather than double clicked.
3)should not go into edit mode when image is clicked on
4)when in edit mode should not expand and contract when text is clicked on.
0
Atanas Korchev
Telerik team
answered on 25 Feb 2009, 01:46 PM
Hi ali,

RadTreeView does not support the requested capability at the time being. I have logged this as a feature suggestion. I have also updated your telerik points.

Regards,
Albert
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
TreeView
Asked by
ali
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
ali
Top achievements
Rank 1
Atanas Korchev
Telerik team
Share this question
or