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

Treeview navigation with arrow keys and related questions

2 Answers 87 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Mo
Top achievements
Rank 1
Mo asked on 02 Aug 2012, 09:42 PM
I am currently in the eval stage and my company will most likely purchase the product in the near future.

I have two questions and hoping for quick answers thinking someone must have done similar things.

1. I have a tree view in one pane and some fields in the second pane that are related to the selected item in the treeview. Each node click refreshes the field values in the second pane. Clicking on each node causes a partial post back so it can refresh the fields in the second pane - this is expected. However, it doesn't retain the focus and therefore no longer allows arrow-key navigation until focus is manually moved to it.

2. When navigating by the arrow key, I have to hit Enter to actually select the node and to fire the server side click event. Is it possible to select the node and fire the even on just the up-down keys instead of having to hit Enter to select a node?


Thank you so much in advance

2 Answers, 1 is accepted

Sort by
0
Mo
Top achievements
Rank 1
answered on 02 Aug 2012, 09:51 PM
Ok - I resolved the first issue by calling a javascript function (to set the focus) from the server side node click. Can someone help me with #2?

thanks in advance
0
Plamen
Telerik team
answered on 07 Aug 2012, 03:41 PM
Hi,

 
You can use the OnClientKeyPressing event and  on click of the desired keys to perform the desired functionality. If you need to call a server code you can use Ajax Request to do it as described in this help topic.

Hope this will be helpful.

Greetings,
Plamen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
TreeView
Asked by
Mo
Top achievements
Rank 1
Answers by
Mo
Top achievements
Rank 1
Plamen
Telerik team
Share this question
or