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

Show context menu on button click

1 Answer 340 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Josh Anderson
Top achievements
Rank 1
Josh Anderson asked on 30 Jul 2008, 03:29 PM
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

1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 30 Jul 2008, 04:41 PM
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.
Tags
Menu
Asked by
Josh Anderson
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or