BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
//subscribe to these event
this.gridControl2.CurrentCellActivating += new GridCurrentCellActivatingEventHandler(gridControl2_CurrentCellActivating);
this.gridControl2.CellDoubleClick += new Syncfusion.Windows.Forms.Grid.GridCellClickEventHandler(this.gridControl2_CellDoubleClick);
this.gridControl2.CurrentCellStartEditing += new CancelEventHandler(gridControl2_CurrentCellStartEditing);
Here are the event handlers and a private member.
private int avoidAutomaticSwitchToEditMode = 0; private void gridControl2_CurrentCellActivating(object sender, GridCurrentCellActivatingEventArgs e) { GridCurrentCell cc = this.gridControl2.CurrentCell; GridStyleInfo style = this.gridControl2[e.RowIndex, e.ColIndex]; if (style.CellType == "MaskEdit") avoidAutomaticSwitchToEditMode = 2; } private void gridControl2_CurrentCellStartEditing(object sender, CancelEventArgs e) { if (avoidAutomaticSwitchToEditMode > 0) e.Cancel = true; avoidAutomaticSwitchToEditMode = Math.Max(0, avoidAutomaticSwitchToEditMode - 1); } private void gridControl2_CellDoubleClick(object sender, GridCellClickEventArgs e) { GridCurrentCell cc = this.gridControl2.CurrentCell; GridStyleInfo style = this.gridControl2[e.RowIndex, e.ColIndex]; if (style.CellType == "MaskEdit") { avoidAutomaticSwitchToEditMode = 0; cc.BeginEdit(true); } }