Re: HTMLTable\Cell\AddControl
- From: gh <gh@xxxxx>
- Date: Thu, 26 Jan 2006 10:17:33 -0600
Eliyahu:
If I have a control in the cell and replace it using tblDisplay.Rows[0].Cells[0].Controls.Add(aCtl);
It adds the control below the existing one. How do I remove the existing control first?
TIA
Eliyahu Goldin wrote:
tblDisplay.Rows[0].Cells[0].Controls.Add(aCtl);
Eliyahu
"gh" <gh@xxxxx> wrote in message news:uvxDuvnIGHA.3056@xxxxxxxxxxxxxxxxxxxxxxx
I have a HTML Table with 1 row and 1 column. I have a control I want to add to the cell at runtime based on a condition. I can get the control added by creating a row and cell and using the code below:
cell.Controls.Add(aCtl); row.Cells.Add(cell); tblDisplay.Rows.Add(row);
Is there a way to add the control to the row and cell already setup in the table? When I try, tblDisplay.Controls.Add(aCtl), I get the following error message:
'HtmlTable' cannot have children of type 'display_ascx'.
TIA
.
- Follow-Ups:
- Re: HTMLTable\Cell\AddControl
- From: Eliyahu Goldin
- Re: HTMLTable\Cell\AddControl
- References:
- HTMLTable\Cell\AddControl
- From: gh
- Re: HTMLTable\Cell\AddControl
- From: Eliyahu Goldin
- HTMLTable\Cell\AddControl
- Prev by Date: Re: Export to Excel
- Next by Date: Re: ASP.NET and COM+
- Previous by thread: Re: HTMLTable\Cell\AddControl
- Next by thread: Re: HTMLTable\Cell\AddControl
- Index(es):
Relevant Pages
|