HI all, I have the following table defined (codeside):
What I would like is for the next row that is inserted into the table to only have 1row (i.e the 3columns are merged into 1) and that a panel is inserted into that row.Code:Table testtable = 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); testtable.Rows.Add(row); TableRow row2 = new TableRow(); //ADD SHOW ALERT BUTTON TableCell tablecell = new TableCell(); ImageButton button = new ImageButton(); button.Click += new ImageClickEventHandler(ImageButton1_Click); tablecell.Controls.Add(button); row2.Cells.Add(tablecell); //ADD Client cell tablecell = new TableCell(); tablecell.Text = "<a href='ClientHomePage.aspx'>Client</a>"; row2.Cells.Add(tablecell); //ADD Status Cell tablecell = new TableCell(); tablecell.Text = "Status"; row2.Cells.Add(tablecell); testtable.Rows.Add(row2); Panel1.Controls.Clear(); Panel1.Controls.Add(testtable);
ive tried adding the following before adding the contol to the panel:
however, i get the following error: 'TableRow' cannot have children of type 'Panel'.Code:TableRow tablerow2 = new TableRow(); Panel AlertPanel = new Panel(); tablerow2.Controls.Add(AlertPanel); testtable.Rows.Add(tablerow2);
If any1 could help me with these 2 problems that would be much appreciated.
Cheers




Bookmarks