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

AccessKey for a client side context menu

3 Answers 52 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Som
Top achievements
Rank 1
Som asked on 21 Nov 2008, 09:40 PM
I am creating the context menu for a Treeview Node using Javascript on the client side. I need to set the access key for the menu items but I have not been able to find a client side method to do that. I will appreciate if you could please guide me.

Thanks
Som

3 Answers, 1 is accepted

Sort by
0
Veselin Vasilev
Telerik team
answered on 24 Nov 2008, 03:22 PM
Hello Som,

To set the accessKey property of a menu item with javascript you can do the following:

//item is a reference to a RadMenu item client object 
item.get_linkElement().accessKey = "U" 

I hope this helps.

Kind regards,
Veselin Vasilev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Som
Top achievements
Rank 1
answered on 25 Nov 2008, 07:34 PM
Thanks Veselin for your response. This is sort of working but it does not underline the "Access Key" letter.  I have tried a lot of different things but nothing worked.  Any ideas?

Thanks again
Som
0
Veselin Vasilev
Telerik team
answered on 27 Nov 2008, 08:45 AM
Hi Som,

It will not underline the letter automatically. You need to do it yourself via the <U> html tag:

Text="Access <u>k</u>ey is K"

I hope this helps.

Sincerely yours,
Veselin Vasilev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
TreeView
Asked by
Som
Top achievements
Rank 1
Answers by
Veselin Vasilev
Telerik team
Som
Top achievements
Rank 1
Share this question
or