BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
string enter = Environment.NewLine; private void gridControl1_CurrentCellValidating(object sender, CancelEventArgs e) { GridCurrentCell cc = this.gridControl1.CurrentCell; GridStyleInfo style = this.gridControl1[cc.RowIndex, cc.ColIndex]; if(style.CellType == "FormulaCell" && cc.Renderer.ControlText.IndexOf(enter) > -1) { cc.Renderer.Control.Text = cc.Renderer.ControlText.Replace(enter, ""); } }But I am not sure this will give you all the behavior you want. You may also have to set othe rproperties like
this.gridControl1.TableStyle.AllowEnter = true;
if you want to be able to hit enter in a cell without moving to the next cell. There is also a grid.EnterKeyBehavior property that may need to be set.
GridControl grid = sender as GridControl;
if(grid != null)
{
GridCurrentCell cc = grid.CurrentCell;
///........
}
>GridControl grid = sender as GridControl;
>if(grid != null)
>{
> GridCurrentCell cc = grid.CurrentCell;
> ///........
>}
>