Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/04/14 15:02:57 (10 years ago)
Author:
mleitner
Message:

Keep sorting when content changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.4/DataGridContentView.cs

    r10947 r10949  
    109109
    110110    protected override void OnContentChanged() {
     111      List<KeyValuePair<int, SortOrder>> order = new List<KeyValuePair<int, SortOrder>>(base.sortedColumnIndices);
    111112      base.OnContentChanged();
    112113      // ToDo: Temporarily disabled because needs to much performance
    113       //DataGridView.AutoResizeColumns();
    114       //DataGridView.AutoResizeRowHeadersWidth(DataGridViewRowHeadersWidthSizeMode.AutoSizeToAllHeaders);
     114      // DataGridView.AutoResizeColumns();
     115      // DataGridView.AutoResizeRowHeadersWidth(DataGridViewRowHeadersWidthSizeMode.AutoSizeToAllHeaders);
     116     
    115117      DataGridView.RowHeadersWidth = 70;
     118
    116119      if (Content == null && findAndReplaceDialog != null) {
    117120        findAndReplaceDialog.Close();
    118121      }
     122
     123      if (Content != null) {
     124        base.sortedColumnIndices = order;
     125        base.Sort();
     126      }
     127
    119128    }
    120129
     
    155164            break;
    156165        }
    157       }
     166       }
    158167      searchIterator = null;
    159168    }
Note: See TracChangeset for help on using the changeset viewer.