Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/19/14 14:00:57 (10 years ago)
Author:
sbreuer
Message:
  • highlighting of cells
File:
1 edited

Legend:

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

    r10622 r10623  
    4040
    4141    private IList<int> _highlightedRowIndices;
    42     public IList<int> highlightedRowIndices {
     42    public IList<int> HighlightedRowIndices {
    4343      get { return _highlightedRowIndices; }
    4444      set {
    4545        _highlightedRowIndices = value;
     46        Refresh();
     47      }
     48    }
     49
     50    private IDictionary<int, IList<int>> _highlightedCells;
     51    public IDictionary<int, IList<int>> HightlightedCells {
     52      get { return _highlightedCells; }
     53      set {
     54        _highlightedCells = value;
    4655        Refresh();
    4756      }
     
    5463      dataGridView.KeyUp += dataGridView_KeyUp;
    5564      contextMenuCell.Items.Add(ShowHideColumns);
     65      _highlightedCells = new Dictionary<int, IList<int>>();
     66      _highlightedRowIndices = new List<int>();
    5667    }
    5768
     
    174185      Color backColor = e.CellStyle.BackColor;
    175186
    176       if (highlightedRowIndices != null && highlightedRowIndices.Contains(rowIndex)) {
     187      if (HighlightedRowIndices != null && HighlightedRowIndices.Contains(rowIndex)
     188        || HightlightedCells != null && HightlightedCells.ContainsKey(e.ColumnIndex) && HightlightedCells[e.ColumnIndex].Contains(e.RowIndex)) {
    177189        backColor = Color.Pink;
    178190      }
Note: See TracChangeset for help on using the changeset viewer.