- Timestamp:
- 04/20/10 03:00:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Data.Views/3.3/StringConvertibleMatrixView.cs
r3430 r3431 71 71 Content.ColumnNamesChanged -= new EventHandler(Content_ColumnNamesChanged); 72 72 Content.RowNamesChanged -= new EventHandler(Content_RowNamesChanged); 73 Content.ReadOnlyViewChanged -= new EventHandler(Content_ReadOnlyViewChanged);74 73 base.DeregisterContentEvents(); 75 74 } … … 80 79 Content.ColumnNamesChanged += new EventHandler(Content_ColumnNamesChanged); 81 80 Content.RowNamesChanged += new EventHandler(Content_RowNamesChanged); 82 Content.ReadOnlyViewChanged += new EventHandler(Content_ReadOnlyViewChanged);83 81 } 84 82 … … 126 124 virtualRowIndizes = Enumerable.Range(0, Content.Rows).ToArray(); 127 125 //DataGridViews with Rows but no columns are not allowed ! 128 if (Content.Rows == 0 && dataGridView.RowCount != Content.Rows && !Content.ReadOnly View)126 if (Content.Rows == 0 && dataGridView.RowCount != Content.Rows && !Content.ReadOnly) 129 127 Content.Rows = dataGridView.RowCount; 130 128 else 131 129 dataGridView.RowCount = Content.Rows; 132 if (Content.Columns == 0 && dataGridView.ColumnCount != Content.Columns && !Content.ReadOnly View)130 if (Content.Columns == 0 && dataGridView.ColumnCount != Content.Columns && !Content.ReadOnly) 133 131 Content.Columns = dataGridView.ColumnCount; 134 132 else … … 162 160 } 163 161 164 private void UpdateReadOnlyControls() {165 dataGridView.ReadOnly = Content.ReadOnlyView;166 rowsTextBox.ReadOnly = Content.ReadOnlyView;167 columnsTextBox.ReadOnly = Content.ReadOnlyView;168 }169 170 162 private void Content_RowNamesChanged(object sender, EventArgs e) { 171 163 if (InvokeRequired) … … 191 183 else 192 184 UpdateData(); 193 }194 195 private void Content_ReadOnlyViewChanged(object sender, EventArgs e) {196 if (InvokeRequired)197 Invoke(new EventHandler(Content_ReadOnlyViewChanged), sender, e);198 else199 UpdateReadOnlyControls();200 185 } 201 186
Note: See TracChangeset
for help on using the changeset viewer.