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;
}