Changeset 3337 for trunk/sources
- Timestamp:
- 04/13/10 19:15:19 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Data.Views/3.3/StringConvertibleMatrixView.cs
r3335 r3337 105 105 virtualRowIndizes = Enumerable.Range(0, Content.Rows).ToArray(); 106 106 //DataGridViews with Rows but no columns are not allowed ! 107 if (Content.Rows == 0 && dataGridView.RowCount != Content.Rows )107 if (Content.Rows == 0 && dataGridView.RowCount != Content.Rows && !Content.ReadOnlyView) 108 108 Content.Rows = dataGridView.RowCount; 109 109 else 110 110 dataGridView.RowCount = Content.Rows; 111 if (Content.Columns == 0 && dataGridView.ColumnCount != Content.Columns )111 if (Content.Columns == 0 && dataGridView.ColumnCount != Content.Columns && !Content.ReadOnlyView) 112 112 Content.Columns = dataGridView.ColumnCount; 113 113 else … … 245 245 } 246 246 private void dataGridView_CellValueNeeded(object sender, DataGridViewCellValueEventArgs e) { 247 i nt rowIndex = virtualRowIndizes[e.RowIndex];248 if (e.RowIndex < Content.Rows && e.ColumnIndex < Content.Columns)247 if (e.RowIndex < Content.Rows && e.ColumnIndex < Content.Columns) { 248 int rowIndex = virtualRowIndizes[e.RowIndex]; 249 249 e.Value = Content.GetValue(rowIndex, e.ColumnIndex); 250 } 250 251 } 251 252 private void dataGridView_Scroll(object sender, ScrollEventArgs e) {
Note: See TracChangeset
for help on using the changeset viewer.