table in tablerow

Discussion in 'ASP .Net' started by Harry, May 7, 2004.

  1. Harry

    Harry Guest

    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
    Harry, May 7, 2004
    #1
    1. Advertising

  2. 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
    >
    >
    Kevin Spencer, May 7, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. frank
    Replies:
    0
    Views:
    325
    frank
    Jul 11, 2003
  2. Steve - DND

    Click Event for TableRow?

    Steve - DND, Jul 31, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    503
    Steve - DND
    Jul 31, 2003
  3. George Durzi

    TableRow/TableCell Serverside Q

    George Durzi, Nov 5, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    707
    Nicole Calinoiu
    Nov 5, 2003
  4. Coleen

    Span in an ASP TableRow

    Coleen, Jan 26, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    435
    coleenholley
    Jan 26, 2004
  5. Adding TableRow Object to Table

    , May 3, 2007, in forum: ASP .Net Building Controls
    Replies:
    0
    Views:
    685
Loading...

Share This Page