XPTable.Models.CellCollection.Insert C# (CSharp) Method

Insert() public method

Inserts a Cell into the collection at the specified index
public Insert ( int index, Cell cell ) : void
index int The zero-based index at which the Cell /// should be inserted
cell Cell The Cell to insert
return void
        public void Insert(int index, Cell cell)
        {
            if (cell == null)
            {
                return;
            }

            if (index < 0)
            {
                throw new IndexOutOfRangeException();
            }

            if (index >= this.Count)
            {
                this.Add(cell);
            }
            else
            {
                base.List.Insert(index, cell);

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