Free cookie consent management tool by TermsFeed Policy Generator

Changeset 4819


Ignore:
Timestamp:
11/16/10 16:57:51 (14 years ago)
Author:
mkommend
Message:

Changed the behavior of the RunCollectionTabularView to apply always the selected filters (ticket #1251).

Location:
trunk/sources
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Data.Views/3.3/StringConvertibleMatrixView.cs

    r4798 r4819  
    145145    }
    146146
    147     protected void UpdateColumnHeaders() {
     147    protected virtual void UpdateColumnHeaders() {
    148148      HashSet<string> invisibleColumnNames = new HashSet<string>(dataGridView.Columns.OfType<DataGridViewColumn>()
    149149      .Where(c => !c.Visible && !string.IsNullOrEmpty(c.HeaderText)).Select(c => c.HeaderText));
  • trunk/sources/HeuristicLab.Optimization.Views/3.3/RunCollectionTabularView.cs

    r4771 r4819  
    9898    }
    9999    #endregion
     100
     101    protected override void UpdateColumnHeaders() {
     102      HashSet<string> visibleColumnNames = new HashSet<string>(dataGridView.Columns.OfType<DataGridViewColumn>()
     103       .Where(c => c.Visible && !string.IsNullOrEmpty(c.HeaderText)).Select(c => c.HeaderText));
     104
     105      for (int i = 0; i < dataGridView.ColumnCount; i++) {
     106        if (i < base.Content.ColumnNames.Count())
     107          dataGridView.Columns[i].HeaderText = base.Content.ColumnNames.ElementAt(i);
     108        else
     109          dataGridView.Columns[i].HeaderText = "Column " + (i + 1);
     110        dataGridView.Columns[i].Visible = visibleColumnNames.Count == 0 || visibleColumnNames.Contains(dataGridView.Columns[i].HeaderText);
     111      }
     112    }
    100113
    101114    private void UpdateRun(IRun run) {
Note: See TracChangeset for help on using the changeset viewer.