Changeset 12167 for branches/DataPreprocessingImprovements
- Timestamp:
- 03/09/15 16:00:26 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessingImprovements/HeuristicLab.DataPreprocessing.Views/3.4/DataGridContentView.cs
r12158 r12167 61 61 dataGridView.KeyDown += dataGridView_KeyDown; 62 62 dataGridView.MouseUp += dataGridView_MouseUp; 63 dataGridView.ColumnHeaderMouseClick += dataGridView_ColumnHeaderMouseClick;64 63 contextMenuCell.Items.Add(ShowHideColumns); 65 64 _highlightedCellsBackground = new Dictionary<int, IList<int>>(); … … 164 163 } 165 164 166 private void dataGridView_ColumnHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e) { 165 protected override void dataGridView_ColumnHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e) { 166 if (Content != null) { 167 if (e.Button == System.Windows.Forms.MouseButtons.Left) { 168 dataGridView.Focus(); 169 dataGridView.ClearSelection(); 170 dataGridView.SelectionChanged -= dataGridView_SelectionChanged; 171 for (int i = 0; i < dataGridView.RowCount; i++) { 172 if (i + 1 == dataGridView.RowCount) 173 dataGridView.SelectionChanged += dataGridView_SelectionChanged; 174 dataGridView[e.ColumnIndex, i].Selected = true; 175 } 176 } else if (Content.SortableView) { 177 SortColumn(e.ColumnIndex); 178 } 179 } 167 180 searchIterator = null; 168 181 } … … 437 450 private void dataGridView_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e) { 438 451 if (Content == null) return; 439 if (e.Button == System.Windows.Forms.MouseButtons.Right) { 440 if (e.ColumnIndex != -1 && e.RowIndex == -1) { 441 dataGridView.Focus(); 442 dataGridView.ClearSelection(); 443 for (int r = 0; r < dataGridView.RowCount; r++) { 444 dataGridView[e.ColumnIndex, r].Selected = true; 445 } 446 return; 447 } 452 if (e.Button == System.Windows.Forms.MouseButtons.Right && !(e.ColumnIndex != -1 && e.RowIndex == -1)) { 448 453 if (e.ColumnIndex == -1 || e.RowIndex == -1) { 449 454 replaceValueOverColumnToolStripMenuItem.Visible = false;
Note: See TracChangeset
for help on using the changeset viewer.