public ActiveGrid() : base() { this.components = new System.ComponentModel.Container(); // This control is only ever intended to be used in the 'Details' view mode base.View = System.Windows.Forms.View.Details; this._lvColumns = new ActiveColumnHeaderCollection(this); this._lvRows = new ActiveRowCollection(this); this._layoutSuspended = false; this._groupIndex = 0; this._flashCount = 0; // NON-FLASH Defaults this.fldUseAlternateRow = true; this.fldUseGradient = false; this.fldFlashFadeEffect = false; // FLASH Defaults this.fldAllowFlashing = false; this.fldFlashUseGradient = false; this.fldFlashDuration = ActiveRow.ActiveCell.DEFAULT_FLASH_DURATION; this.fldFlashFont = this.Font; // Activate double buffering this.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint, true); // Enable the OnNotifyMessage event so we get a chance to filter out // Windows messages before they get to the form's WndProc this.SetStyle(ControlStyles.EnableNotifyMessage, true); this.OwnerDraw = true; }
/// <summary> /// Adds a collection of items to the collection. /// </summary> /// <param name="items">The ActiveGrid.ActiveRowCollection to add to the collection.</param> public void AddRange(ActiveRowCollection items) { base.AddRange(items); foreach (ActiveRow row in items) { for (int i = 1; i < row.SubItems.Count; i++) { ActiveRow.ActiveCell cell = row[i]; if (!String.IsNullOrEmpty(cell.Name)) this._owner._cells.Add(cell.Name, cell); } } }