+2009-01-03 Ivan N. Zlatev <contact@i-nz.net>
+
+ * DataGridViewCell.cs: We should return a value even if we are not bound
+ to a DataGridView.
+
2009-01-02 Ivan N. Zlatev <contact@i-nz.net>
* CurrencyManager.cs, DataGrid.cs:
}
protected virtual object GetValue (int rowIndex) {
- if (DataGridView == null)
- return null;
-
- if (RowIndex < 0 || RowIndex >= DataGridView.Rows.Count)
+ if (DataGridView != null && (RowIndex < 0 || RowIndex >= DataGridView.Rows.Count))
throw new ArgumentOutOfRangeException ("rowIndex", "Specified argument was out of the range of valid values.");
if (DataProperty != null)
return valuex;
DataGridViewCellValueEventArgs dgvcvea = new DataGridViewCellValueEventArgs (columnIndex, rowIndex);
- DataGridView.OnCellValueNeeded (dgvcvea);
+ if (DataGridView != null)
+ DataGridView.OnCellValueNeeded (dgvcvea);
return dgvcvea.Value;
}