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

RadGridView for WPF: Changing ContextMenu per Cell Clicked

4 Answers 323 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Laura
Top achievements
Rank 1
Laura asked on 30 Jun 2009, 03:41 PM
Hi,
I want to be able to display a different context menu depending on which column cell the user right-clicks on as described on this article for the RadGridView for WinForms:
http://www.telerik.com/support/kb/winforms/gridview/radgridview-custom-context-menu-dependent-on-element-clicked.aspx


I need to be able to do the same in WPF. Is it possible?
Thanks,
Laura

4 Answers, 1 is accepted

Sort by
0
Allan
Top achievements
Rank 1
answered on 01 Jul 2009, 10:09 PM
I'm also interested in this....    
0
Pavel Pavlov
Telerik team
answered on 03 Jul 2009, 09:23 AM
Hello Laura and Allan,

Please have a look at the attached sample project. It demonstrates a way to have different context menus for the first and the second column .

Don't hesitate to ask if you find any troubles adapting this to your projects


Best wishes,
Pavel Pavlov
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
Laura
Top achievements
Rank 1
answered on 03 Jul 2009, 04:40 PM
Hello,

Thank you so much for the example. I would like to have this implemented using a StyleSelector, but I can't find the appropriate property that I should set; is it even possible?

Thanks,
Laura
0
Pavel Pavlov
Telerik team
answered on 08 Jul 2009, 03:04 PM

Hi Laura,
Unfortunately GridViewCell, GridViewColumn and GridViewRow do not expose any properties of type StyleSelector.  So in short - such implementation will not be possible with the current version of RadGridView. However your request is very reasonable and I will elevate this to be included as an  API improvement for our future versions.

Kind regards,

Pavel Pavlov
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.
Tags
GridView
Asked by
Laura
Top achievements
Rank 1
Answers by
Allan
Top achievements
Rank 1
Pavel Pavlov
Telerik team
Laura
Top achievements
Rank 1
Share this question
or