Hello,
I'm using the rad context menu as a popup menu, fired up with left mouse click.
problem is that when the menu slides down and opens, it immediatly closes. i noticed that if i keep the mouse button down, the context menu stays open, but i can't really do nothing that way.
unfortunatlly i can't add an example here.
basically, i have a table. each row has an onmousedown event, which fires up the context menu with the help of the contextmenu.show(event) method.
How can i fix this?
I'm using the rad context menu as a popup menu, fired up with left mouse click.
problem is that when the menu slides down and opens, it immediatly closes. i noticed that if i keep the mouse button down, the context menu stays open, but i can't really do nothing that way.
unfortunatlly i can't add an example here.
basically, i have a table. each row has an onmousedown event, which fires up the context menu with the help of the contextmenu.show(event) method.
How can i fix this?
5 Answers, 1 is accepted
0
Accepted
Hi Roy,
You can try canceling the DOM event bubbling:
event.cancelBubble = true;
if (event.stopPropagation)
event.stopPropagation();
Best wishes,
Albert
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
You can try canceling the DOM event bubbling:
event.cancelBubble = true;
if (event.stopPropagation)
event.stopPropagation();
Best wishes,
Albert
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0

Roy
Top achievements
Rank 1
answered on 20 Nov 2008, 10:24 AM
thanks for the help, but i actually fixed it myself.
i changed the event i used to onclick, and thus the the menu stayed opened.
probeblly something with the event lifecycle or whatever ;p
i changed the event i used to onclick, and thus the the menu stayed opened.
probeblly something with the event lifecycle or whatever ;p
0

Augusto
Top achievements
Rank 1
answered on 20 Feb 2009, 05:29 PM
Hello Roy.
I'm having the same problem as you had. I applied the Telerik code but it does not work.
What did you change in the event management to make your menu stay open ?
Thanks for your help
Best regards
Augusto
I'm having the same problem as you had. I applied the Telerik code but it does not work.
What did you change in the event management to make your menu stay open ?
Thanks for your help
Best regards
Augusto
0
Hello Augusto,
Can you please paste here some code so we can try to find the problem?
Thanks
Regards,
Veselin Vasilev
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Can you please paste here some code so we can try to find the problem?
Thanks
Regards,
Veselin Vasilev
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0

Augusto
Top achievements
Rank 1
answered on 23 Feb 2009, 07:53 AM
Hello.
I have found out why the context menu did not keep open. It was because the page is nested in a master page and you must put the full control name in the ContextMenuElementId property. The context control is "FpSpreadDashboard" but in a master page the "_ctl0_ContentPlaceHolder_" prefix is insert before the control id ("ContentPlaceHolder" is the ContentPlaceHolderID property of my nested page) : <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder" runat="Server">
So it must be:
I have found out why the context menu did not keep open. It was because the page is nested in a master page and you must put the full control name in the ContextMenuElementId property. The context control is "FpSpreadDashboard" but in a master page the "_ctl0_ContentPlaceHolder_" prefix is insert before the control id ("ContentPlaceHolder" is the ContentPlaceHolderID property of my nested page) : <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder" runat="Server">
So it must be:
<
rad:RadMenu ID="RadContextMenu"
...
ContextMenuElementID="_ctl0_ContentPlaceHolder_FpSpreadDashboard"
...
</rad:RadMenu>
Let me know if there is another way of dealing with RadMenu within a master page.
Thanks
Best regards
Augusto