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

Radtree NodeTemplate editing

4 Answers 85 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
nacharya
Top achievements
Rank 1
nacharya asked on 01 Sep 2010, 08:42 AM
Hi,
I am using RadGrid as node Templates in Radtree. Radgrid has suppoort to add/edit the fields. When Radgrid goes into add/edit mode & I press spacebar in Textbox inside the radgrid automatically root tree node gets selected & on presseing left/right arrow keys tree refreshes. How I can stop selecting the tree node on pressing space key inside the textbox. I tried disabling the onkeydown event

tree.detachEvent("onkeydown",tree.onkeydown);  for tree but it did not work.


Thanks.

4 Answers, 1 is accepted

Sort by
0
nacharya
Top achievements
Rank 1
answered on 01 Sep 2010, 02:56 PM
do you need some more information on this?
0
Nikolay Tsenkov
Telerik team
answered on 06 Sep 2010, 10:13 AM
Hello nacharya,

I think I solved this problem.
Here it goes:
1. Handle the ClientLoad event of the TreeView;
2. In the handler add the following code:
var $=$telerik.$;
 
$(".rtTemplate").bind("keydown",function (e) {
    if(e.keyCode==32)
        e.stopPropagation();
});

Hope this is going to help you!


Regards,
Nikolay Tsenkov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Neal
Top achievements
Rank 1
answered on 29 Aug 2011, 06:44 PM
Just an FYI, stumbled across this as I had the same issue, the solutions does work.

Thank you
0
Nikolay Tsenkov
Telerik team
answered on 31 Aug 2011, 10:36 AM
Hi Neal,

 You are welcome.

Regards,
Nikolay Tsenkov
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Tags
TreeView
Asked by
nacharya
Top achievements
Rank 1
Answers by
nacharya
Top achievements
Rank 1
Nikolay Tsenkov
Telerik team
Neal
Top achievements
Rank 1
Share this question
or