BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
this.gridDataBoundGrid1.CurrentCell.ErrorMessage = "my error message...";
private void gridDataBoundGrid1_CurrentCellValidating(object sender, CancelEventArgs e) { GridCurrentCell cc = this.gridDataBoundGrid1.CurrentCell; if(cc.RowIndex > 0 && cc.ColIndex == 2) { double d; if(!double.TryParse(cc.Renderer.ControlText, System.Globalization.NumberStyles.Any, null, out d)) { e.Cancel = true; cc.ErrorMessage = "MyMessage"; } }
int field = this.grid.Binder.ColIndexToField(cc.ColIndex);
Type t = this.grid.GridBoundColumns[field].StyleInfo.CellValueType;
// t now has the System.Type
// if you have not explicitly added GridBoundColumns, then use grid.Binder.InternalColumns instead of grid.GridBoundColumns