Changeset 4707
- Timestamp:
- 11/02/10 13:38:43 (14 years ago)
- Location:
- trunk/sources
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Data.Views/3.3/StringConvertibleMatrixView.cs
r4652 r4707 116 116 columnsTextBox.Text = Content.Columns.ToString(); 117 117 columnsTextBox.Enabled = true; 118 118 119 //DataGridViews with rows but no columns are not allowed ! 119 120 if (Content.Rows == 0 && dataGridView.RowCount != Content.Rows && !Content.ReadOnly) … … 129 130 UpdateColumnHeaders(); 130 131 UpdateRowHeaders(); 132 131 133 dataGridView.AutoResizeColumns(DataGridViewAutoSizeColumnsMode.ColumnHeader); 132 134 dataGridView.AutoResizeRowHeadersWidth(DataGridViewRowHeadersWidthSizeMode.AutoSizeToDisplayedHeaders); … … 135 137 136 138 protected void UpdateColumnHeaders() { 139 HashSet<string> visibleColumnNames = new HashSet<string>(dataGridView.Columns.OfType<DataGridViewColumn>() 140 .Where(c => c.Visible && !string.IsNullOrEmpty(c.HeaderText)).Select(c => c.HeaderText)); 141 137 142 for (int i = 0; i < dataGridView.ColumnCount; i++) { 138 if ( Content.ColumnNames.Count() != 0)143 if (i < Content.ColumnNames.Count()) 139 144 dataGridView.Columns[i].HeaderText = Content.ColumnNames.ElementAt(i); 140 145 else 141 146 dataGridView.Columns[i].HeaderText = "Column " + (i + 1); 142 147 } 148 149 foreach (DataGridViewColumn column in dataGridView.Columns) 150 column.Visible = visibleColumnNames.Contains(column.HeaderText) || visibleColumnNames.Count == 0; 143 151 } 144 152 protected void UpdateRowHeaders() { … … 149 157 150 158 while (updatedRows < count) { 151 if ( Content.RowNames.Count() != 0)159 if (virtualRowIndizes[index] < Content.RowNames.Count()) 152 160 dataGridView.Rows[index].HeaderCell.Value = Content.RowNames.ElementAt(virtualRowIndizes[index]); 153 161 else -
trunk/sources/HeuristicLab.Optimization/3.3/RunCollection.cs
r4518 r4707 88 88 columnNamesChanged |= AddResult(result.Key, result.Value); 89 89 } 90 if (columnNamesChanged) { 91 columnNameCache = null; 92 OnColumnNamesChanged(); 93 } 90 if (columnNamesChanged) columnNameCache = null; 94 91 rowNamesCache = null; 95 92 base.OnItemsAdded(items); 93 OnReset(); 96 94 OnRowNamesChanged(); 97 OnReset();95 if (columnNamesChanged) OnColumnNamesChanged(); 98 96 UpdateFiltering(false); 99 97 } … … 106 104 columnNamesChanged |= RemoveResultName(resultName); 107 105 } 108 if (columnNamesChanged) { 109 columnNameCache = null; 110 OnColumnNamesChanged(); 111 } 106 if (columnNamesChanged) columnNameCache = null; 112 107 rowNamesCache = null; 113 108 base.OnItemsRemoved(items); 109 OnReset(); 114 110 OnRowNamesChanged(); 115 OnReset();111 if (columnNamesChanged) OnColumnNamesChanged(); 116 112 } 117 113
Note: See TracChangeset
for help on using the changeset viewer.