private void gridViewMain_PopupMenuShowing(object sender, DevExpress.XtraGrid.Views.Grid.PopupMenuShowingEventArgs e) { if (e.HitInfo.HitTest == DevExpress.XtraGrid.Views.Grid.ViewInfo.GridHitTest.EmptyRow || e.HitInfo.HitTest == DevExpress.XtraGrid.Views.Grid.ViewInfo.GridHitTest.RowCell ) { GridView view = sender as GridView; view.FocusedRowHandle = e.HitInfo.RowHandle; _gcm = new GridViewCustomMenu(this, view, e.HitInfo.HitTest == DevExpress.XtraGrid.Views.Grid.ViewInfo.GridHitTest.RowCell ? PopupMenyType.addRem : PopupMenyType.justAdd ); _gcm.Init(e.HitInfo); _gcm.Show(e.Point); } }
public void remRow() { _bs.RemoveCurrent(); _gcm.Dispose(); _gcm = null; }
public void addRow() { _bs.AddNew(); _gcm.Dispose(); _gcm = null; }