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

how to open contextmenu in empty grid

2 Answers 196 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Ralf
Top achievements
Rank 1
Ralf asked on 16 Jan 2013, 10:54 AM
Hi,

I have a gridview placed in my usercontrol, and added a RadContextMenu to the grid via XAML. The context menu will be shown fine when I right click onto a row. But I need to open the contextmenu in any area of the grid.
For example I need to copy and paste some data into the grid, and the grid is empty.
How to solve my problem?

Regards,

Ralf

2 Answers, 1 is accepted

Sort by
0
Yoan
Telerik team
answered on 17 Jan 2013, 10:10 AM
Hello Ralf,

I have prepared a sample project that you can find attached. As you can see from it, I have defined a RadContextMenu in my GridView without doing something special and I am able to show the ContextMenu not only by right-clicking on the rows. Can you refer to demo project and let me know how it differs from yours ?

Regards,
Yoan
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Ralf
Top achievements
Rank 1
answered on 17 Jan 2013, 12:33 PM
Hello Yoan,

thank you for the sample. Yes, my implementation was different. The contextmenu was implemented in an  inherited class and there was set a wrong flag in the Opened event.

Thank you for support.

Best regards,
Ralf
Tags
GridView
Asked by
Ralf
Top achievements
Rank 1
Answers by
Yoan
Telerik team
Ralf
Top achievements
Rank 1
Share this question
or