ZForge.Controls.XPTable.Models.CellCollection.Add C# (CSharp) Method

Add() public method

Adds the specified Cell to the end of the collection
public Add ( Cell cell ) : int
cell Cell The Cell to add
return int
        public int Add(Cell cell)
        {
            if (cell == null)
            {
                throw new System.ArgumentNullException("Cell is null");
            }

            int index = this.List.Add(cell);

            this.OnCellAdded(new RowEventArgs(this.owner, cell, index, index));

            for (int i = 1; i < cell.ColSpan; i++)
            {
                this.Add(new Cell(string.Empty));
            }

            return index;
        }