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.
"Harry" <> wrote in message
news:##...
> 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
>
>
|