RadContextMenu - manual close

3 posts, 0 answers
  1. richard
    richard avatar
    38 posts
    Member since:
    May 2011

    Posted 09 Jan 2012 Link to this post

    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. richard
    richard avatar
    38 posts
    Member since:
    May 2011

    Posted 09 Jan 2012 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Kate
    Admin
    Kate avatar
    1898 posts

    Posted 11 Jan 2012 Link to this post

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