wrexhamafc234
Programmer
Hi all, im creating a table code-side
This table is being added to a Panel in the page_load event.
I want the second row in this table to only have 1 colum (i.e. all the 4 columns are merged) and to include a Panel.
When running this code, im getting an error:
'TableRow' cannot have children of type 'Panel'.
Is this not possible at all, or is there anythin else I can use instead of a panel that will work?
Code:
Table clienttable = new Table();
TableRow row = new TableRow();
//HEADINGS
TableCell cell = new TableCell();
cell.Text = "<b>Show Alerts</b>";
row.Cells.Add(cell);
cell = new TableCell();
cell.Text = "<b>Client</b>";
row.Cells.Add(cell);
cell = new TableCell();
cell.Text = "<b>Status</b>";
row.Cells.Add(cell);
clienttable.Rows.Add(row);
TableRow row2 = new TableRow();
//HEADINGS
Panel Panel1 = new Panel();
row2.Controls.Add(Panel1);
clienttable.Rows.Add(row2);
This table is being added to a Panel in the page_load event.
I want the second row in this table to only have 1 colum (i.e. all the 4 columns are merged) and to include a Panel.
When running this code, im getting an error:
'TableRow' cannot have children of type 'Panel'.
Is this not possible at all, or is there anythin else I can use instead of a panel that will work?