Navigate using Keyboard

3 posts, 0 answers
  1. George
    George avatar
    3 posts
    Member since:
    Oct 2008

    Posted 09 Jan 2009 Link to this post

    I am using a Telik Treeview and using NavigateUrl I am able to navigate to another page using the mouse click. I can move from  one node to another using arrows from the keyboard, but I would like to navigate to another page by using Enter or something else.
    Is it possible?

    Thanks.

    George
  2. Yana
    Admin
    Yana avatar
    4795 posts

    Posted 10 Jan 2009 Link to this post

    Hi George,

    I suggest you subscribe to OnClientKeyPressing event and simulate click of the node in its handler like this:

    function onClientKeyPressing(sender, args)  
    {  
      var ev = args.get_domEvent();  
      if(ev.keyCode == 13)  
      {   
         args.get_node().get_linkElement().click();  
      }  

    Kind regards,
    Yana
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. George
    George avatar
    3 posts
    Member since:
    Oct 2008

    Posted 13 Jan 2009 Link to this post

    Thank you for the solution.

    George
Back to Top