Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > table in tablerow

Reply
Thread Tools

table in tablerow

 
 
Harry
Guest
Posts: n/a
 
      05-07-2004
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


 
Reply With Quote
 
 
 
 
Kevin Spencer
Guest
Posts: n/a
 
      05-07-2004
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
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding TableRow Object to Table vishalbahl@gmail.com ASP .Net Building Controls 0 05-03-2007 01:23 PM
Span in an ASP TableRow Coleen ASP .Net 2 01-26-2004 11:57 PM
TableRow/TableCell Serverside Q George Durzi ASP .Net 2 11-05-2003 06:48 PM
Click Event for TableRow? Steve - DND ASP .Net 3 07-31-2003 02:40 PM
Simply Displaying Information From TableRow frank ASP .Net 0 07-11-2003 04:10 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57