GridView + RadContextMenu = Designer Failure

5 posts, 0 answers
  1. Morgan
    Morgan avatar
    81 posts
    Member since:
    Dec 2009

    Posted 30 Apr 2013 Link to this post

    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.
  2. Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 01 May 2013 Link to this post

    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.

  3. Morgan
    Morgan avatar
    81 posts
    Member since:
    Dec 2009

    Posted 01 May 2013 Link to this post

    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
  4. Morgan
    Morgan avatar
    81 posts
    Member since:
    Dec 2009

    Posted 01 May 2013 Link to this post

    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.
  5. Vanya Pavlova
    Admin
    Vanya Pavlova avatar
    2019 posts

    Posted 02 May 2013 Link to this post

    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.

Back to Top