Show context menu on button click

2 posts, 0 answers
  1. Josh Anderson
    Josh Anderson avatar
    83 posts
    Member since:
    Dec 2005

    Posted 30 Jul 2008 Link to this post

    I know this is probably a simple request, but I haven't had much luck.  I would like to show a radContextMenu below a button when that button is clicked (not right-clicked), much like the Windows Forms splitbutton works.  However, I'm not having much luck calling the show() method when the button is clicked, probably because I don't know how I'd get a DOM event to pass as an argument.

    Is there an easy way to do this or do I have to use showAt() and get the position and size of the button to determine where to pop the context menu?  If so, then perhaps you can help me keep the context menu shown.  Right now, if I use showAt, the menu appears then disappears.  I presumably have to use the recommended $telerik.cancelRawEvent(event), but how do I get the "event" argument?

    Josh
  2. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 30 Jul 2008 Link to this post

    Hi Josh Anderson,

    You can check this online example. It demonstrates how to open a context menu on left button click.

    Regards,
    Albert
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top