如何在SpreadsheetControl的右键菜单中添加自定义菜单项?
使用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");
} 新控件资料不多,还在摸索,感谢分享 受教了,谢谢楼主。
如何给自定义的菜单加子菜单
页:
[1]