Hello!
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.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);
}
}