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

Context Menu on Grid (angularjs)

1 Answer 94 Views
Grid
This is a migrated thread and some comments may be shown as answers.
DM
Top achievements
Rank 1
DM asked on 21 Apr 2017, 03:56 PM

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

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 25 Apr 2017, 10:20 AM
Hello Mattia,

I can suggest a custom 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.
Tags
Grid
Asked by
DM
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or