How to navigate up/down with the keyboard?

5 posts, 0 answers
  1. Robert
    Robert avatar
    253 posts
    Member since:
    Aug 2007

    Posted 30 Sep 2009 Link to this post

    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
  2. Yana
    Admin
    Yana avatar
    5039 posts

    Posted 30 Sep 2009 Link to this post

    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.
  3. Robert
    Robert avatar
    253 posts
    Member since:
    Aug 2007

    Posted 30 Sep 2009 Link to this post

    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
  4. Yana
    Admin
    Yana avatar
    5039 posts

    Posted 02 Oct 2009 Link to this post

    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.
  5. Robert
    Robert avatar
    253 posts
    Member since:
    Aug 2007

    Posted 02 Oct 2009 Link to this post

    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
Back to Top