BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
private void gridControl1_CurrentCellKeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e) { GridCurrentCell cc = this.gridControl1.CurrentCell; GridStyleInfo style = this.gridControl1[cc.RowIndex, cc.ColIndex]; if(style.AutoSize && style.WrapText) { this.gridControl1.BeginUpdate(); cc.ConfirmChanges(false); GridRangeInfo range = GridRangeInfo.Cell(cc.RowIndex, cc.ColIndex); int nOldHeight = this.gridControl1.GetRowHeight(cc.RowIndex); this.gridControl1.RowHeights.ResizeToFit(range, GridResizeToFitOptions.NoShrinkSize|GridResizeToFitOptions.ResizeCoveredCells); this.gridControl1.EndUpdate(); if(this.gridControl1.GetRowHeight(cc.RowIndex) != nOldHeight) this.gridControl1.Refresh(); } }