Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/21/10 16:08:55 (14 years ago)
Author:
mkommend
Message:

Added ColumnsChanged and RowsChanged event in IStringConvertibleMatrix and all implementing classes (ticket #1269).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Analysis/3.3/DataVisualization/DataTable.cs

    r5097 r5150  
    128128      foreach (DataRow row in e.Items)
    129129        this.RegisterRowEvents(row);
     130
     131      this.OnColumnsChanged();
    130132      this.OnColumnNamesChanged();
    131133      this.OnReset();
     
    134136      foreach (DataRow row in e.Items)
    135137        this.DeregisterRowEvents(row);
     138
     139      this.OnColumnsChanged();
    136140      this.OnColumnNamesChanged();
    137141      this.OnReset();
     
    142146      foreach (DataRow row in e.Items)
    143147        this.RegisterRowEvents(row);
     148
     149      this.OnColumnsChanged();
    144150      this.OnColumnNamesChanged();
    145151      this.OnReset();
     
    150156      foreach (DataRow row in e.Items)
    151157        this.RegisterRowEvents(row);
     158
     159      if (e.OldItems.Count() != e.Items.Count())
     160        this.OnColumnsChanged();
    152161      this.OnColumnNamesChanged();
    153162      this.OnReset();
     
    239248      if (handler != null) handler(this, EventArgs.Empty);
    240249    }
     250    public event EventHandler ColumnsChanged;
     251    protected virtual void OnColumnsChanged() {
     252      var handler = ColumnsChanged;
     253      if (handler != null) handler(this, EventArgs.Empty);
     254    }
     255    public event EventHandler RowsChanged;
     256    protected virtual void OnRowsChanged() {
     257      var handler = RowsChanged;
     258      if (handler != null) handler(this, EventArgs.Empty);
     259    }
    241260    public event EventHandler ColumnNamesChanged;
    242261    protected virtual void OnColumnNamesChanged() {
Note: See TracChangeset for help on using the changeset viewer.