Treeview in combobox keyboard navigation?

4 posts, 0 answers
  1. Amar
    Amar avatar
    21 posts
    Member since:
    Oct 2008

    Posted 02 Mar 2009 Link to this post

    Hi, I am deciding whether to use the TreeViewCombobox method, as shown in the demos that come with telerik installation.

    /TreeView/Examples/Functionality/TreeViewComboBox/DefaultCS.aspx

    I need to ensure that the selection of treeeview item is possible through the keyboard. so far i have try navigating the treeview in the demo page but have not been successfull.

    To expand the dropdown and make the treeview visible i use ALT + Down arrow key. This works. But then i cannot set focus to the treeview no matter what i do. Can anyone please tell me whether it is possible or any key combinations.

    Thanks.

    Amar
  2. Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 04 Mar 2009 Link to this post

    Hi Amar,

    Here is what you can do:

    Set the AccessKey of the TreeView (e.g. AccessKey="I") and the TabIndex (e.g. TabIndex="2").

    Now when you tab to the combobox and click on the Alt + Down array the dropdown will open. Now you can click on Alt + I to focus the treeview. Then you can use the down arrow to navigate the tree nodes.

    I hope this helps.

    Regards,
    Veselin Vasilev
    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Vijay
    Vijay avatar
    1 posts
    Member since:
    Mar 2012

    Posted 16 Mar 2012 Link to this post

    Hi,

    I have the same issue as reported here. We have a RadComboBox, with an ItemTemplate containing only a RadTreeView. Is there some way to programatically move the keyboard focus to the tree when the drop down area is displayed? It seems like this should be easy to do, but I have not had any success yet. 

    I've tried hooking the OnClientDropDownOpened event, which allows me to expand the tree and select items, but it does not move the keyboard focus to the treeview automatically. Is there any way to do this so our keyboard-only users do not need to learn another key combination for this?

       function RadCombo_OnClientDropDownOpened(sender, eventArgs) 
        {
            var tree = sender.get_items().getItem(0).findControl("RadTreeView1"); 
            tree.get_nodes().getNode(0).expand();
            tree.get_nodes().getNode(0).select();
            tree.focus();
        }

  5. Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1266 posts

    Posted 21 Mar 2012 Link to this post

    Hi,

    Try to change you implementation as following:
    function RadCombo_OnClientDropDownOpened(sender, eventArgs) {
        var tree = sender.get_items().getItem(0).findControl("RadTreeView1");
        tree.get_nodes().getNode(0).expand();
        tree.get_nodes().getNode(0).select();
        tree.get_element().focus();
    }

    This should solve your problem.

    All the best,
    Dimitar Terziev
    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.
Back to Top