public SummaryControlContainer(DataGridViewSummary dgv) { if (dgv == null) { throw new Exception("DataGridView is null!"); } this.dgv = dgv; sumBoxHash = new Hashtable(); sumRowHeaderLabel = new Label(); this.dgv.CreateSummary += new EventHandler(dgv_CreateSummary); this.dgv.RowsAdded += new DataGridViewRowsAddedEventHandler(dgv_RowsAdded); this.dgv.RowsRemoved += new DataGridViewRowsRemovedEventHandler(dgv_RowsRemoved); this.dgv.CellValueChanged += new DataGridViewCellEventHandler(dgv_CellValueChanged); this.dgv.Scroll += new ScrollEventHandler(dgv_Scroll); this.dgv.ColumnWidthChanged += new DataGridViewColumnEventHandler(dgv_ColumnWidthChanged); this.dgv.RowHeadersWidthChanged += new EventHandler(dgv_RowHeadersWidthChanged); this.VisibleChanged += new EventHandler(SummaryControlContainer_VisibleChanged); this.dgv.ColumnAdded += new DataGridViewColumnEventHandler(dgv_ColumnAdded); this.dgv.ColumnRemoved += new DataGridViewColumnEventHandler(dgv_ColumnRemoved); this.dgv.ColumnStateChanged += new DataGridViewColumnStateChangedEventHandler(dgv_ColumnStateChanged); this.dgv.ColumnDisplayIndexChanged += new DataGridViewColumnEventHandler(dgv_ColumnDisplayIndexChanged); }
public SummaryControlContainer(DataGridViewSummary dgv) { if (dgv == null) throw new Exception("DataGridView is null!"); this.dgv = dgv; sumBoxHash = new Hashtable(); sumRowHeaderLabel = new Label(); this.dgv.CreateSummary += new EventHandler(dgv_CreateSummary); this.dgv.RowsAdded += new DataGridViewRowsAddedEventHandler(dgv_RowsAdded); this.dgv.RowsRemoved += new DataGridViewRowsRemovedEventHandler(dgv_RowsRemoved); this.dgv.CellValueChanged += new DataGridViewCellEventHandler(dgv_CellValueChanged); this.dgv.Scroll += new ScrollEventHandler(dgv_Scroll); this.dgv.ColumnWidthChanged += new DataGridViewColumnEventHandler(dgv_ColumnWidthChanged); this.dgv.RowHeadersWidthChanged += new EventHandler(dgv_RowHeadersWidthChanged); this.VisibleChanged += new EventHandler(SummaryControlContainer_VisibleChanged); this.dgv.ColumnAdded += new DataGridViewColumnEventHandler(dgv_ColumnAdded); this.dgv.ColumnRemoved += new DataGridViewColumnEventHandler(dgv_ColumnRemoved); this.dgv.ColumnStateChanged += new DataGridViewColumnStateChangedEventHandler(dgv_ColumnStateChanged); this.dgv.ColumnDisplayIndexChanged += new DataGridViewColumnEventHandler(dgv_ColumnDisplayIndexChanged); }