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

RadContextMenu - manual close

2 Answers 103 Views
Menu
This is a migrated thread and some comments may be shown as answers.
richard
Top achievements
Rank 1
richard asked on 09 Jan 2012, 07:59 AM
Hello,
I am using radContextMenu on right ckick on a RadTreeNode.

The context menu closes when you click elsewhere on the screen as you would expect, except when you click on an iframe - then the contect menu stays in place.

I have found some code that will detect a click on the iframe:
http://stackoverflow.com/questions/2381336/detect-click-into-iframe-using-javascript

Could I ask then I how I would obtain a reference / test if the context menu is visible from javascript and then close it when a user clicks on the Iframe?

Many thanks
Richard


2 Answers, 1 is accepted

Sort by
0
richard
Top achievements
Rank 1
answered on 09 Jan 2012, 11:45 AM
Hi
I have pretty much failed on this one! - I was unable to attach mouseover and mouseout events to the RadPane.

I wonder then should the context menu not close anyway when the mouse moves off the menu?

Or maybe we can attatch mouseout event to the context menu in order to call javascript to close the menu?

Best Regards
Richard
0
Kate
Telerik team
answered on 11 Jan 2012, 01:30 PM
Hi Richard,

To close the menu you can use its client-side API and in particular the close() property. Further, in case you need to operate between different frames I would suggest that you try out the approach described in the forum post below:

http://www.telerik.com/community/forums/aspnet-ajax/ribbonbar/frames-and-navigation-from-a-button.aspx#1758884

Greetings,
Kate
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
Menu
Asked by
richard
Top achievements
Rank 1
Answers by
richard
Top achievements
Rank 1
Kate
Telerik team
Share this question
or