private void Row_OnRowChanged(int rowNumber, int cellCount)
{
if (this.Table.ColumnCollection.Count <= cellCount)
{
for(int i=0; i <= cellCount-this.Table.ColumnCollection.Count; i++)
{
this.Table.ColumnCollection.Add(new Column(Table, string.Format("col{0}", this.Table.ColumnCollection.Count)));
}
}
for(int i=0; i < rowNumber; i++)
{
Row row = this.Table.Rows[i];
if (row.Cells.Count >= cellCount)
continue;
for(int ii = 0; ii < cellCount - row.Cells.Count; ii++)
//for(int ii = cellCount - row.Cells.Count; ii < cellCount; ii++)
{
row.Cells.Add(new Cell(Table.Document));
}
}
}
#endregion