public void CalculateAllRowHeights()
{
using (Graphics g = this.CreateGraphics())
{
for (int i = 0; i < this.TableModel.Rows.Count; i++)
{
Row row = this.TableModel.Rows[i];
if (row != null)
{
int h = GetRenderedRowHeight(g, row);
row.InternalHeight = h;
}
}
}
}