Changeset 9307 for branches/ImprovingStringConvertibleMatrix/HeuristicLab.Data.Views/3.3/StringConvertibleMatrixView.cs
- Timestamp:
- 03/12/13 09:26:49 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ImprovingStringConvertibleMatrix/HeuristicLab.Data.Views/3.3/StringConvertibleMatrixView.cs
r9306 r9307 130 130 virtualRowIndices = Enumerable.Range(0, Content.Rows).ToArray(); 131 131 132 //dataGridView.RowCount = 0;133 134 132 if (Content.Columns == 0) { 135 133 Content.Columns = 1; … … 262 260 #region DataGridView Events 263 261 private void dataGridView_CellValidating(object sender, DataGridViewCellValidatingEventArgs e) { 264 if (!dataGridView.ReadOnly) { 262 // RowIndex and ColumnIndex have to be checked, if they are in bounds, otherwise Cancel might be set, which can lead to exceptions 263 if (!dataGridView.ReadOnly && e.RowIndex < Content.Rows && e.ColumnIndex < Content.Columns) { 265 264 string errorMessage; 266 265 if (Content != null && !Content.Validate(e.FormattedValue.ToString(), out errorMessage)) { 267 //e.Cancel = true;266 e.Cancel = true; 268 267 dataGridView.Rows[e.RowIndex].ErrorText = errorMessage; 269 268 }
Note: See TracChangeset
for help on using the changeset viewer.