Problem with RadContextMenu.SetContextMenu

2 posts, 0 answers
  1. Qutfullo
    Qutfullo avatar
    3 posts
    Member since:
    Sep 2015

    Posted 23 Nov 2015 Link to this post


    I have a question about the RadContextMenu. I created my class DataGridView so this class inherited from RadGridView. If I add contextMenu with    RadContextMenu.SetContextMenu(this, contextMenu) can't add new contextMenu. Look this:

    public class DataGridView : RadGridView

       public DataGridView()

              // create menu
                var contextMenu = new RadContextMenu();
                RadMenuItem item = new RadMenuItem();
                item.Header = "Hello";
                contextMenu.Opened += ContextMenu_Opened;
                //add something that we can use to get the data grid on context menu events
                contextMenu.ItemClick += ContextMenu_ItemClick;
                contextMenu.Opening += ContextMenu_Opening;
                // set menu Theme
                StyleManager.SetTheme(contextMenu, StyleManager.GetTheme(this));
                RadContextMenu.SetContextMenu(this, contextMenu);



  2. Nasko
    Nasko avatar
    555 posts

    Posted 24 Nov 2015 Link to this post

    Hello Qutfullo,

    We are not exactly sure that we completely understand your scenario. We tested the provided code-snippet and it seems everything works as expected on our side - the ContextMenu is set  as expected. Please, check the attached sample that demonstrates that. Could you please try to modify the sample in order to reproduce your issue and send it back to us - thus we could provide you with a prompt solution?

    We also suggest you the following article from our help documentation that provides detailed information how to set RadContextMenu to RadGridView:

    We hope this will help you.

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. DevCraft R3 2016 release webinar banner
Back to Top