AODL.Document.Content.Tables.Row.CellCollection_Inserted C# (CSharp) Method

CellCollection_Inserted() private method

Cells the collection_ inserted.
private CellCollection_Inserted ( int index, object value ) : void
index int The index.
value object The value.
return void
		private void CellCollection_Inserted(int index, object value)
		{
			//Only Spreadsheet documents are automaticaly resized
			//not needed if the file is loaded (right order!);
			if (this.Document is SpreadsheetDocument
			    && !this.Document.IsLoadedFile)
			{
				if (this.Node.ChildNodes.Count == index)
					this.Node.AppendChild(((Cell)value).Node);
				else
				{
					XmlNode childNode		= this.Node.ChildNodes[index];
					this.Node.InsertAfter(((Cell)value).Node, childNode);
				}
				Row_OnRowChanged(this.GetRowIndex(), this.Cells.Count);
			}
			else
				this.Node.AppendChild(((Cell)value).Node);
		}