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

Navigate using Keyboard

2 Answers 64 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
George
Top achievements
Rank 1
George asked on 09 Jan 2009, 03:59 PM
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 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 10 Jan 2009, 01:56 PM
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.
0
George
Top achievements
Rank 1
answered on 13 Jan 2009, 03:48 PM
Thank you for the solution.

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