views:

21

answers:

0

I have a HTML table that is built with a repeater. Sometimes the table has 5 rows, sometimes it has 8 rows.

It was easy to add the header rows.

<asp:PlaceHolder runat="server" ID="additionalHeaderColumns" />

In code behind I added controls (htmlheadercells) to the contentholder:

Dim tableHeaderCell As New TableHeaderCell()
tableHeaderCell.Text = "Test"
additionalHeaderColumns.Controls.Add(tableHeaderCell)

When I try to do the same in the databound event for each row I get an errormessage that tells that its not possible to put asp:PlaceHolder inside the row. it expects tablecells.

Anybody have a solution how to expand number of columns in a repeater?