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

Add() public method

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

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

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

            else if (rowowner != null)
            {
                // this is a sub row, so it needs a parent
                row.Parent = rowowner;
                row.ChildIndex = this.List.Count;
                this.OnRowAdded(new RowEventArgs(row, RowEventType.Unknown));
            }

            return index;
        }