TableRow CreateRow (Control c0, Control c1, Control c2, Style s0, Style s1)
{
TableRow row = new TableRow ();
TableCell cell0 = new TableCell ();
TableCell cell1 = new TableCell ();
cell0.Controls.Add (c0);
row.Controls.Add (cell0);
if ((c1 != null) && (c2 != null)) {
cell1.Controls.Add (c1);
cell1.Controls.Add (c2);
cell0.HorizontalAlign = HorizontalAlign.Right;
if (s0 != null)
cell0.ApplyStyle (s0);
if (s1 != null)
cell1.ApplyStyle (s1);
row.Controls.Add (cell1);
} else {
cell0.ColumnSpan = 2;
cell0.HorizontalAlign = HorizontalAlign.Center;
if (s0 != null)
cell0.ApplyStyle (s0);
}
return row;
}