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

context menu on cell

4 Answers 1161 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Matteo
Top achievements
Rank 1
Matteo asked on 14 Jun 2017, 11:17 AM

 

is there any way to append a context menu to each (or part of them) cells of the kendo grid ?

what I am trying to do is to give to the cell a drill-down options functionalit.

what I would like to do is:  right click a cell of the grid and view a context menu with the available drillable options, once I clicked one action of the menu I need to retrieve the sender cell parameters like for example row id, column id, value etc.. depending on action needs.

I've found a way to have a similar functionality by using tooltip which is fired on left-click and which allows me to retrive sender-cell data through selected method of the grid, but I'd like to improve this solution.

Any suggestions? I'm using angular 1.x.x

4 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 16 Jun 2017, 05:42 AM
Hello Matteo,

In this scenario, I can suggest initializing the ContextMenu over the Grid rows. Then on the select event of the ContextMenu to retrieve the row information using the dataItem method of the Grid:

http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#methods-dataItem

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

I made an example demonstrating this. The example is using jQuery, but the AngularJS implementation is similar:

http://dojo.telerik.com/iNuXet

I hope this is helpful.

Regards,
Stefan
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 (charts) and form elements.
0
Matteo
Top achievements
Rank 1
answered on 16 Jun 2017, 11:15 AM

It works fine !

Thank you

0
raymond
Top achievements
Rank 1
answered on 04 May 2018, 12:31 PM

Hi, the link to the dojo http://dojo.telerik.com/iNuXet no longer seems to be working. 

Do you have another example of how to achieve this? Thanks.

0
Stefan
Telerik team
answered on 07 May 2018, 05:51 AM
Hello, Raymond,

The Dojo is still working on my end.

Still, I can assume that may be as we switched to https, some of the older Dojos on HTTP could lead to issues when loaded.

I transferred to the example on https and updated it to use the latest version:

https://dojo.telerik.com/OrutoYor

Regards,
Stefan
Progress Telerik
Try our brand new, jQuery-free Angular 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
Matteo
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Matteo
Top achievements
Rank 1
raymond
Top achievements
Rank 1
Share this question
or