- Timestamp:
- 04/13/10 11:12:49 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Data.Views/3.3/StringConvertibleMatrixView.cs
r3320 r3324 80 80 base.OnContentChanged(); 81 81 sortedColumnIndizes.Clear(); 82 virtualRowIndizes = new int[0];83 82 if (Content == null) { 84 83 Caption = "StringConvertibleMatrix View"; … … 90 89 dataGridView.Columns.Clear(); 91 90 dataGridView.Enabled = false; 91 virtualRowIndizes = new int[0]; 92 92 } else { 93 93 Caption = "StringConvertibleMatrix (" + Content.GetType().Name + ")"; … … 101 101 columnsTextBox.Text = Content.Columns.ToString(); 102 102 columnsTextBox.Enabled = true; 103 virtualRowIndizes = Enumerable.Range(0, Content.Rows).ToArray(); 104 dataGridView.EndEdit(); 103 105 dataGridView.RowCount = 0; 104 106 dataGridView.ColumnCount = 0; 105 107 if ((Content.Rows > 0) && (Content.Columns > 0)) { 106 virtualRowIndizes = Enumerable.Range(0, Content.Rows - 1).ToArray();107 108 dataGridView.RowCount = Content.Rows; 108 109 dataGridView.ColumnCount = Content.Columns; … … 217 218 } 218 219 private void dataGridView_CellValueNeeded(object sender, DataGridViewCellValueEventArgs e) { 219 if (e.RowIndex < virtualRowIndizes.Length) { 220 int rowIndex = virtualRowIndizes[e.RowIndex]; 221 e.Value = Content.GetValue(rowIndex, e.ColumnIndex); 222 } 220 int rowIndex = virtualRowIndizes[e.RowIndex]; 221 e.Value = Content.GetValue(rowIndex, e.ColumnIndex); 223 222 } 224 223
Note: See TracChangeset
for help on using the changeset viewer.