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

GridView + RadContextMenu = Designer Failure

4 Answers 165 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Morgan
Top achievements
Rank 1
Iron
Morgan asked on 30 Apr 2013, 09:35 PM
As the title mentions the GridView for some reason (not sure when it started), will only accept System.Windows.Controls.ContextMenu as its contextmenu in the design time environment.  Even though the documentation states RadContextMenu was viable.

Also it doesn't not take on the Theme set...

Title Amendment... Designer doesn't fail per se, but merely indicates that the RadContextMenu is correct type for use with the RadGridView very much contradicting the documentation.  Therefore a bug imo.

4 Answers, 1 is accepted

Sort by
0
Vanya Pavlova
Telerik team
answered on 01 May 2013, 07:19 AM
Hello Morgan,



Would it be possible to share some more info, how are you trying to set the context menu to RadGridView?
Do you get he same exception at runtime or it is  design-time error only?
Any additional code snippet and information about the desired final result will be highly appreciated as well.



Kind regards,
Vanya Pavlova
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Morgan
Top achievements
Rank 1
Iron
answered on 01 May 2013, 07:06 PM
When I created the thread it was only after the fact that I believe the title was miss-leading therefore here is a screen shot of the what I have in the designer and VS.NET complaining about.

It is indeed a runtime error and design-time...
 
{"'Telerik.Windows.Controls.RadContextMenu Items.Count:0' is not a valid value for property 'ContextMenu'."}

Based on documentation for the control it should allow the RadContextMenu as an option but clearly doesn't do this.  It will only allow ContextMenu base control not indicated in the docs.

http://www.telerik.com/help/wpf/radcontextmenu-how-to-use-radcontextmenu-with-radgridview.html

Morgan
0
Morgan
Top achievements
Rank 1
Iron
answered on 01 May 2013, 07:45 PM
Ok I think I have seen the error of my ways... but wow what a cluster this leads too...

There are 2 ways to attach a context menu to the grid...  That is kinda of scary actually...  One is the way I have it using BCL controls in the runtime.

The other way is via not involving the GridView as you have indicated in the docs and that just occurred to me therefore its not a bug but a very bad way to document how you incorporate the contextmenu of your design into the grid. 

I hope others haven't unsuspectingly done this way and not seen the results as intended (ie layout/skin). This can be disregarded as RTFM.  No bug just slightly bad handling of dependency properties on inheriting other controls basic design.
0
Vanya Pavlova
Telerik team
answered on 02 May 2013, 07:06 AM
Hi Morgan,



I am glad to hear that you were able to resolve the issue by your side.
If you encounter any other problems do not hesitate to contact us again.
Have a great day!



Greetings,
Vanya Pavlova
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
GridView
Asked by
Morgan
Top achievements
Rank 1
Iron
Answers by
Vanya Pavlova
Telerik team
Morgan
Top achievements
Rank 1
Iron
Share this question
or