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

Context menu event not triggered when right clicking some cells

1 Answer 182 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Johan
Top achievements
Rank 1
Johan asked on 21 Feb 2013, 02:04 PM
In my RadGridView I capture the DropDownOpening events to pop up my own context menu like this:
this.ContextMenuGrid.DropDownOpening += new System.ComponentModel.CancelEventHandler (this.ContextMenuGrid_DropDownOpening);


One of the columns in the grid contains self references added like this

 

radGridView1.Relations.AddSelfReference(radGridView1.MasterTemplate, "Id", "AktivitetRef");



So, I get plus icons in the cells where references are available. When the cells containing the plus icon are right clicked, the event is triggered and I generate the context menu I want, but when other cells in that column are right clicked, the event is not triggered and a default context menu is displayed.

Why is the event not triggered? Any idea?

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 26 Feb 2013, 10:23 AM
Hi Johan,

Thank you for writing.

I am not quite sure that I understand how you have setup your context menu, however, the correct way to handle context menus in RadGridView to use the ContextMenuOpening event. Please refer to the following documentation section for more details: http://www.telerik.com/help/winforms/gridview-context-menus-custom-context-menus.html.

If you continue experiencing issues, please get back to me with information how can I reproduce the exact scenario and I will help you with it.

All the best,
Stefan
the Telerik team
Q3'12 SP1 of RadControls for WinForms is out now. See what's new.
Tags
GridView
Asked by
Johan
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or