Get column names dynamically in datalist?

Discussion in 'ASP .Net Web Controls' started by beanweed, Jun 17, 2004.

  1. beanweed

    beanweed Guest

    I have a dataset generated from XMLDataDocument. There are nested tables. Like this, sort of:
    <somedata>
    <item>
    <blah>stuff</blah>
    <yada>whatever</yada>
    <detail>
    <col1>value</col1>
    <col2>valyu</col2>
    </detail>
    </item>
    ...(many more "items")
    </somedata>

    What I want is a table showing:

    stuff whatever col1:value col2:valyu
    ... (again for each "item")

    I thought I would have a datalist showing the "detail" child table.
    So--> How can I get a datalist that renders "column name":"column value" ? An added plus if it doesn't show anything if the value is null.

    Many thanks
    beanweed, Jun 17, 2004
    #1
    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. David M. Weprin
    Replies:
    0
    Views:
    416
    David M. Weprin
    Oct 16, 2003
  2. Showjumper
    Replies:
    1
    Views:
    334
    Peter Bromberg [C# MVP]
    Feb 21, 2004
  3. Nevyn Twyll
    Replies:
    8
    Views:
    1,868
  4. Pradeep
    Replies:
    2
    Views:
    34,004
    Pradeep
    May 31, 2006
  5. swapnil Daingade

    how to get data grid column names

    swapnil Daingade, Aug 6, 2003, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    169
    Saravana
    Aug 6, 2003
Loading...

Share This Page