AccessKey for a client side context menu

4 posts, 0 answers
  1. Som
    Som avatar
    35 posts
    Member since:
    Oct 2007

    Posted 21 Nov 2008 Link to this post

    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

  2. Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 24 Nov 2008 Link to this post

    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.
  3. Som
    Som avatar
    35 posts
    Member since:
    Oct 2007

    Posted 25 Nov 2008 Link to this post

    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
  4. Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 27 Nov 2008 Link to this post

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