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

How to navigate up/down with the keyboard?

4 Answers 65 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 30 Sep 2009, 06:40 AM
I want to allow navigation of the treeview using the Up & Down keys on the keyboard.  So I followed the instructions shown here, specifically setting TabIndex="1" and AccessKey="T".  But unlike the demo on your website, it didn't change anything.

What more do I need to do?

Robert

4 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 30 Sep 2009, 06:51 AM
Hello there,

I guess that  you're using RadTreeView for ASP.NET AJAX, but this example is for RadTreeView for ASP.NET, here is the correct help article.

Regards,
Yana
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Robert
Top achievements
Rank 1
answered on 30 Sep 2009, 05:14 PM
You're correct about me trying to get it working in your latest version of TreeView.  But the procedure is still the same, namely to add this property in the TreeView definition:   TabIndex="1"

I've tried this in several treeview instances and it does not enable the Up & Down keys to navigate through the treeview.  Here's an example definition:

         <telerik:RadTreeView ID="treeViewMain" runat="server"
                               TabIndex="1"
                               ExpandAnimation-Duration="5"
                               ShowLineImages="true"
                               OnNodeExpand="treeViewMain_NodeExpand"
                               OnNodeClick="treeViewMain_NodeClick"
                               MultipleSelect="false"
                               AllowNodeEditing="false"
                               Height="500px" Width="350px"
                               style="background-color:#F0F8FF"
          />

Why does it work in your demo but not for me in practice?

Robert
0
Yana
Telerik team
answered on 02 Oct 2009, 01:58 PM
Hi again,

I tested this code and keyboard navigation works without a problem.  Please check the attached simple page for a reference.

Best regards,
Yana
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Robert
Top achievements
Rank 1
answered on 02 Oct 2009, 06:21 PM
Yana,

Thank you for your extra effort on this!  I appreciate you duplicating my treeview configuration in your example.

I loaded up your example in Visual Studio and . . . it worked!  So I went back to my project to figure out why it was not working.  After a few minutes I finally figured out why: I have code in each NodeClick event that sets focus to associated textbox and dropdown listbox controls beside the treeview.  The idea was that if a user clicked on a treeview node, he'd likely want to start editing the data associated with it.

Clearly this is causing a conundrum now because there's greatly value in navigating up & down the treeview with the keyboard keys.  I'll have to think more about what approach to use.

Thank you again for your assistance!

Robert
Tags
TreeView
Asked by
Robert
Top achievements
Rank 1
Answers by
Yana
Telerik team
Robert
Top achievements
Rank 1
Share this question
or