Novacode.Table.AddCellToRow C# (CSharp) Method

AddCellToRow() private method

Adds a cell to the right or left of a cell
private AddCellToRow ( Row row, System.Xml.Linq.XElement cell, int index, bool direction ) : void
row Row is the row you are adding
cell System.Xml.Linq.XElement is the cell you are adding
index int the cell index position you are refferencing from
direction bool which side of the cell you wish to add cell
return void
        private void AddCellToRow(Row row, XElement cell, int index, bool direction)
        {
            index -= 1;
            if (direction)
            {
                row.Cells[index].Xml.AddAfterSelf(cell);
            }
            else
            {
                row.Cells[index].Xml.AddBeforeSelf(cell);
            }
        }