Contextmenu alignment

2 posts, 0 answers
  1. Ron
    Ron avatar
    65 posts
    Member since:
    Oct 2010

    Posted 11 Jul Link to this post

    Hi, 

    I'm not sure whether or not this has been asked but I'll ask the question nonetheless. I have a button to which I have tied a contextmenu. I would like the contextmenu to be align at the bottom of the button with the top right corner aligned to the bottom right of the button. As far as I can tell this behavior is not supported by the contextmenu API. I have managed to get a workaround working:

    http://dojo.telerik.com/aSUlI/10

    This workaround is not ideal since the repositioning of the contextmenu wrapper is done in the open event and you can see the contextmenu move from the original position to the adjusted position. Is there a better way to this?

    Greetings,
    Ron

     

  2. Ivan Danchev
    Admin
    Ivan Danchev avatar
    1332 posts

    Posted 13 Jul Link to this post

    Hi Ron,

    Indeed, except for the alignToAnchor configuration option, the ContextMenu does not expose other options or methods that would allow you to specify how exactly it should be aligned. We do not have a workaround alternative to the one you have found. Even though the logic in your fixAlignment event handler can be executed a little earlier (in the Actions div's click handler) the result is similar.

    Regards,
    Ivan Danchev
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top