SpreadsheetControl通过PopupMenuShowing事件添加自定义菜单
使用SpreadsheetControl.PopupMenuShowing这个事件来实现:[*]private void spreadsheetControl1_PopupMenuShowing(object sender, DevExpress.XtraSpreadsheet.PopupMenuShowingEventArgs e)
[*]{
[*] e.Menu.Items.Add(new DevExpress.Utils.Menu.DXMenuItem("MyMenu", new EventHandler(mymenu_Click)));
[*]}
[*]
[*]void mymenu_Click(object sender, EventArgs e)
[*]{
[*] MessageBox.Show("test");
[*]}
如何向“MyMenu”添加子菜单?
页:
[1]