Building Dynamic tablecells

Discussion in 'ASP .Net' started by gane kol, Mar 17, 2005.

  1. gane kol

    gane kol Guest

    Hi,

    In C# code behind, I have to generate the table row and cells dynamically
    based on the value stored in the datatable.
    For eg:
    In my datatable,

    Element Type ElementRow
    (column name) (columnname)
    --------------------------------
    label 1
    textbox 1
    fieldvalidator 1
    Label 2
    textbox 2

    I need to create 2 rows, one with 3 columns and another with 2 columns
    inside the rows based on the datatable elementrow column.
    Is there any method available to fetch unique records based on a column and
    count properties?
    any help with eg. appreciated.

    Thanks
    Gane
    gane kol, Mar 17, 2005
    #1
    1. Advertising

  2. gane kol

    Lars Netzel Guest

    I'm not sure what you are after in the question really , sounds like you are
    making things a bit harder than they need to be.

    I would use a a Datagrid with ONE template column and then, in ItemCreated
    or ItemDataBound build my own HTML Table and then typ ethat out in a label
    in the Template column or something.. then you are not stopped by anything
    when it comes to alignments and stuff.

    /Lars


    "gane kol" <> wrote in message
    news:%...
    > Hi,
    >
    > In C# code behind, I have to generate the table row and cells dynamically
    > based on the value stored in the datatable.
    > For eg:
    > In my datatable,
    >
    > Element Type ElementRow
    > (column name) (columnname)
    > --------------------------------
    > label 1
    > textbox 1
    > fieldvalidator 1
    > Label 2
    > textbox 2
    >
    > I need to create 2 rows, one with 3 columns and another with 2 columns
    > inside the rows based on the datatable elementrow column.
    > Is there any method available to fetch unique records based on a column
    > and
    > count properties?
    > any help with eg. appreciated.
    >
    > Thanks
    > Gane
    >
    >
    Lars Netzel, Mar 17, 2005
    #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. Diane Yocom

    Extra space after asp:tablecells?

    Diane Yocom, Apr 15, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    399
    Diane Yocom
    Apr 15, 2004
  2. Brian Shannon

    Building a Dynamic Where Clause

    Brian Shannon, Aug 5, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    636
    Scott Allen
    Aug 5, 2004
  3. Mark Rae

    Adding events to TableCells

    Mark Rae, Nov 17, 2005, in forum: ASP .Net
    Replies:
    5
    Views:
    574
    Mark Rae
    Nov 17, 2005
  4. Hugo de Payns
    Replies:
    5
    Views:
    500
    Leif K-Brooks
    Oct 2, 2003
  5. Midex
    Replies:
    24
    Views:
    885
Loading...

Share This Page