Changeset 10916 for branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/DataGridContentView.cs
- Timestamp:
- 05/28/14 15:34:34 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/DataGridContentView.cs
r10911 r10916 74 74 _highlightedCellsBackground = new Dictionary<int, IList<int>>(); 75 75 currentCell = null; 76 DataGridView.SelectionChanged += DataGridView_SelectionChanged; 77 } 78 79 void DataGridView_SelectionChanged(object sender, EventArgs e) { 80 if (!isSearching && Content != null) { 81 Content.DataGridLogic.SetSelection(GetSelectedCells()); 76 } 77 78 protected override void dataGridView_SelectionChanged(object sender, EventArgs e) { 79 if (Content != null) { 80 if (!isSearching) { 81 base.dataGridView_SelectionChanged(sender, e); 82 Content.DataGridLogic.SetSelection(GetSelectedCells()); 83 } 82 84 } 83 85 } … … 103 105 OnContentChanged(); 104 106 searchIterator = null; 105 } 107 } 106 108 107 109 protected override void DeregisterContentEvents() { … … 129 131 if (!dataGridView.ReadOnly) { 130 132 string errorMessage; 131 if (Content != null) {133 if (Content != null) { 132 134 if (dataGridView.IsCurrentCellInEditMode && Content.FilterLogic.IsFiltered()) { 133 135 errorMessage = "A filter is active, you cannot modify data. Press ESC to exit edit mode."; … … 192 194 } 193 195 194 void DataGridView_SelectionChanged_FindAndReplace(object sender, EventArgs e) {196 private void DataGridView_SelectionChanged_FindAndReplace(object sender, EventArgs e) { 195 197 if (Content != null) { 196 198 if (!isSearching && AreMultipleCellsSelected()) { … … 276 278 isSearching = true; 277 279 SuspendRepaint(); 278 foreach (var column in FindAll(findAndReplaceDialog.GetSearchText())) { 280 var selectedCells = FindAll(findAndReplaceDialog.GetSearchText()); 281 foreach (var column in selectedCells) { 279 282 foreach (var cell in column.Value) { 280 283 dataGridView[column.Key, cell].Selected = true; … … 283 286 ResumeRepaint(true); 284 287 isSearching = false; 285 DataGridView_SelectionChanged(null, null); 288 Content.DataGridLogic.SetSelection(selectedCells); 289 //update statistic in base 290 base.dataGridView_SelectionChanged(sender, e); 286 291 } 287 292
Note: See TracChangeset
for help on using the changeset viewer.