BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
private void gridControl1_CurrentCellControlGotFocus(object sender, System.Windows.Forms.ControlEventArgs e) { GridCurrencyTextBox tb = e.Control as GridCurrencyTextBox; if(tb != null) { GridCurrentCell cc = this.gridControl1.CurrentCell; GridStyleInfo style = this.gridControl1[cc.RowIndex, cc.ColIndex]; tb.CurrencySymbol = style.CurrencyEdit.CurrencySymbol; //set whatever other style.CurrencyEdit properties you need } }
>private void gridControl1_CurrentCellControlGotFocus(object sender, System.Windows.Forms.ControlEventArgs e) >{ > GridCurrencyTextBox tb = e.Control as GridCurrencyTextBox; > if(tb != null) > { > GridCurrentCell cc = this.gridControl1.CurrentCell; > GridStyleInfo style = this.gridControl1[cc.RowIndex, cc.ColIndex]; > tb.CurrencySymbol = style.CurrencyEdit.CurrencySymbol; > //set whatever other style.CurrencyEdit properties you need > } >} >
this.gridControl1.ActivateCurrentCellBehavior = GridCellActivateAction.SetCurrent;
But if you only want to do it for currencycells, you can handle the CurrentCellMoved event, and start the cell editing there if it is a currency cell.
private void grid_CurrentCellMoved(object sender, GridCurrentCellMovedEventArgs e) { GridCurrentCell cc = this.gridControl1.CurrentCell; if(!cc.IsEditing && this.gridControl1[cc.RowIndex, cc.ColIndex].CellType == "Currency") { cc.BeginEdit(true); } }