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

Problem with RadContextMenu.SetContextMenu

0 Answers 9 Views
ContextMenu
This is a migrated thread and some comments may be shown as answers.
Qutfullo
Top achievements
Rank 1
Qutfullo asked on 24 Nov 2015, 05:48 AM

Hello!

I have a question about the RadContextMenu. I created my class DataGridView this class inherited from RadGridView. Look this:

 public class DataGridView : RadGridView
{

public DataGridView()
{

            // create menu
            var contextMenu = new RadContextMenu();
            RadMenuItem item = new RadMenuItem();
            item.Header = "Hello";
            contextMenu.Items.Add(item);
            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);

    }

}

No answers yet. Maybe you can help?

Tags
ContextMenu
Asked by
Qutfullo
Top achievements
Rank 1
Share this question
or