private void DgResultOnCellFormatting(object sender, DataGridViewCellFormattingEventArgs dataGridViewCellFormattingEventArgs) { int columnIndex = dataGridViewCellFormattingEventArgs.ColumnIndex; DataGridView grid = (DataGridView)sender; DataGridViewColumn column = grid.Columns[columnIndex]; Type columnValueType = column.ValueType; if (columnValueType == typeof(string)) return; if (columnValueType.IsValueType) return; dataGridViewCellFormattingEventArgs.Value = "[??]"; }