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

Insert() public method

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

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

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

                if (owner != null)
                    this.owner.OnRowAdded(new TableModelEventArgs(this.owner, row, index, index));

                else if (rowowner != null)
                    this.OnRowAdded(new RowEventArgs(row, RowEventType.Unknown));
            }
        }