By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,590 Members | 663 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,590 IT Pros & Developers. It's quick & easy.

table in tablerow

P: n/a
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
Nov 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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" <ha******@mail.hongkong.com> wrote in message
news:##**************@tk2msftngp13.phx.gbl...
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

Nov 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.