Context Menu on Grid (angularjs)

2 posts, 0 answers
  1. Mattia
    Mattia avatar
    5 posts
    Member since:
    Jan 2015

    Posted 21 Apr 2017 Link to this post

    Is it possibile to add a context menu to cell.

    The idea is add a right click on cell, header, footer to format it.

    Any other options/idea is appreciated

  2. Stefan
    Admin
    Stefan avatar
    2834 posts

    Posted 25 Apr 2017 Link to this post

    Hello Mattia,

    I can suggest a custom implementation to add a context menu in the Grid. During the close event of the ContextMenu bind an event handler to its open event to prevent the opening of the ContextMenu. Then unbind the event handler inside the setTimeout method:

    - open and close events:

    http://docs.telerik.com/kendo-ui/api/javascript/ui/contextmenu#events-close
    http://docs.telerik.com/kendo-ui/api/javascript/ui/contextmenu#events-open

    - binding and unbinding an event handler:

    http://docs.telerik.com/kendo-ui/intro/widget-basics/events-and-methods#event-binding-after-initialization
    http://docs.telerik.com/kendo-ui/intro/widget-basics/events-and-methods#prevent-events
    http://docs.telerik.com/kendo-ui/intro/widget-basics/events-and-methods#unbind-from-events

    I made an example demonstrating this implementation. Please have in mind that the example is using jQuery, but the AngularJs implementation is similar:

    http://dojo.telerik.com/uwuna

    I hope this is helpful.

    Regards,
    Stefan
    Telerik by Progress
    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