table in tablerow

H

Harry

Dear All,

I would like to know whether it is possible to add a table in tablerow?

Dim Table1 As New Table.
Dim Row1 As New TableRow

Dim Table2 As New Table
Row1.Cells.Add(Table2) <- wrong here

Table1.Rows.Add(Row1)

As i want to produce the follow HTML

<table>
<tr>
<td>
<table>
<tr>
<td>records</td>
</tr>
</table>
</td>
</tr>
</table>

Thank you

Regards,
Harry
 
K

Kevin Spencer

It is possible to add a table to a table cell, not a row (Actually, it IS
programmatically possible to add the table to a row, but it results in bad
HTML). However, you can't add a table to the Cells collection of a TableRow.
It isn't a TableCell. The Cells property is a TableCellCollection, which is
a strongly-typed Collection of TableCell objects. Instead, add a TableCell,
and add the Table to its' Controls Collection.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,480
Members
44,900
Latest member
Nell636132

Latest Threads

Top