We will eventually handle this in our code base. For now, here is a work around.
//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);
}
}