private int GetColumnWidth(int column, Cell cell)
{
ColumnCollection columns = this.ColumnModel.Columns;
int width = columns[column].Width;
if (cell.ColSpan > 1)
{
// Just in case the colspan goes over the end of the table
int maxcolindex = Math.Min(cell.ColSpan + column - 1, columns.Count - 1);
for (int i = column + 1; i <= maxcolindex; i++)
{
width += columns[i].Width;
}
}
return width;
}