Changeset 12983 for trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4
- Timestamp:
- 10/06/15 16:41:59 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/DataGridContentView.cs
r12676 r12983 142 142 143 143 144 //protected override void PasteValuesToDataGridView() { 145 // base.PasteValuesToDataGridView(); 146 // dataGridView.Refresh(); 147 //} 144 protected override void PasteValuesToDataGridView() { 145 string[,] values = SplitClipboardString(Clipboard.GetText()); 146 int rowIndex = 0; 147 int columnIndex = 0; 148 if (dataGridView.CurrentCell != null) { 149 rowIndex = dataGridView.CurrentCell.RowIndex; 150 columnIndex = dataGridView.CurrentCell.ColumnIndex; 151 } 152 if (Content.Rows < values.GetLength(1) + rowIndex) Content.Rows = values.GetLength(1) + rowIndex; 153 if (Content.Columns < values.GetLength(0) + columnIndex) Content.Columns = values.GetLength(0) + columnIndex; 154 155 ReplaceTransaction(() => { 156 Content.PreProcessingData.InTransaction(() => { 157 for (int row = 0; row < values.GetLength(1); row++) { 158 for (int col = 0; col < values.GetLength(0); col++) { 159 Content.SetValue(values[col, row], row + rowIndex, col + columnIndex); 160 } 161 } 162 }); 163 }); 164 165 ClearSorting(); 166 //UpdateData(); // rownames are created on DataGrid creation. Therefore, no update possible, yet. 167 } 148 168 149 169 protected override void SetEnabledStateOfControls() {
Note: See TracChangeset
for help on using the changeset viewer.