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

ContextMenu with GridView

4 Answers 234 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Tahir
Top achievements
Rank 1
Tahir asked on 12 May 2009, 11:32 AM
All,

I am using WPF GridView and want to attach a ContextMenu with the GridView. What I want is that when user right-clicks any row a ContextMenu appears with various options like Edit, Delete etc.

I have added a ContextMenu to the RadGridView.ContextMenu however when I right-click on the row is de-selected and the menu appears.

I want to row to be selected and in the code want to get hold of the object bound to the that row.

I would really appreciate for any help.

Regards,
Tahir

4 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 14 May 2009, 06:58 AM
Hello Tahir,

I've made for you small example application to illustrate you how to achieve your goal. You can find the project attached.

All the best,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Brad
Top achievements
Rank 1
answered on 16 Jul 2009, 06:49 PM

0
yonadav
Top achievements
Rank 1
answered on 15 Dec 2009, 10:33 AM
Hi Vlad,

Your example is very helpful and we've put it to use.

We would also like to create a special (different) ContextMenu that appears when multiple rows are selected and THEN one of them is right-clicked. Is this supported? If so, how is it done?

Thank you,
yonadav
0
Vlad
Telerik team
answered on 16 Dec 2009, 08:28 AM
Hello Yonadav,

 You can use the same context menu however hide/show desired menu items in Opened event on the fly.


Greetings,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
GridView
Asked by
Tahir
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Brad
Top achievements
Rank 1
yonadav
Top achievements
Rank 1
Share this question
or