Formatting Parent-Child data in table

Discussion in 'ASP .Net' started by Chris White, Apr 3, 2005.

  1. Chris White

    Chris White Guest

    Kinda new to .NET. I used to build output like this manually in ASP and I
    can't find any examples of creating this with Repeater, DataList, DataGrid
    etc to make it any cleaner in .NET

    select a.au_lname, a.au_fname, t.title, t.price, t.pubdate
    from authors a
    inner join titleauthor ta
    on a.au_id = ta.au_id
    inner join titles t
    on t.title_id = ta.title_id
    where au_lname between 'M' AND 'P'

    I want my output grid to be:

    <tr><td colspan=3>au_lname, a.au_fname</td><tr>
    <tr><td>t.title</td><td> t.price</td><td> t.pubdate</td></tr>
    etc.

    Using data from above query(This may not look right but I hope it conveys
    the idea):

    MacFeather, Stearns
    Cooking with Computers: Surreptitious Balance Sheets 11.95 06/06/1991
    Computer Phobic AND Non-Phobic Individuals: Behavior Variations 21.59
    10/21/1991
    O'Leary, Michael
    Cooking with Computers: Surreptitious Balance Sheets 11.95 06/06/1991
    Sushi, Anyone? 14.99 06/12/1991
    Author3
    Title Price PubDate
    Title Price PubDate
    Title Price PubDate
    Author4
    Title Price PubDate
    etc
    Chris White, Apr 3, 2005
    #1
    1. Advertising

  2. Hi Chris,

    If you're looking for a hierarchical grid, a great starting place is Denis
    Bauer's free control:

    http://www.denisbauer.com/ASPNETControls/HierarGrid.aspx

    Ken

    "Chris White" <chrisjwhite@@@mindspring...com> wrote in message
    news:%...
    > Kinda new to .NET. I used to build output like this manually in ASP and I
    > can't find any examples of creating this with Repeater, DataList, DataGrid
    > etc to make it any cleaner in .NET
    >
    > select a.au_lname, a.au_fname, t.title, t.price, t.pubdate
    > from authors a
    > inner join titleauthor ta
    > on a.au_id = ta.au_id
    > inner join titles t
    > on t.title_id = ta.title_id
    > where au_lname between 'M' AND 'P'
    >
    > I want my output grid to be:
    >
    > <tr><td colspan=3>au_lname, a.au_fname</td><tr>
    > <tr><td>t.title</td><td> t.price</td><td> t.pubdate</td></tr>
    > etc.
    >
    > Using data from above query(This may not look right but I hope it conveys
    > the idea):
    >
    > MacFeather, Stearns
    > Cooking with Computers: Surreptitious Balance Sheets 11.95
    > 06/06/1991
    > Computer Phobic AND Non-Phobic Individuals: Behavior Variations 21.59
    > 10/21/1991
    > O'Leary, Michael
    > Cooking with Computers: Surreptitious Balance Sheets 11.95
    > 06/06/1991
    > Sushi, Anyone? 14.99 06/12/1991
    > Author3
    > Title Price PubDate
    > Title Price PubDate
    > Title Price PubDate
    > Author4
    > Title Price PubDate
    > etc
    >
    Ken Cox [Microsoft MVP], Apr 3, 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. davout
    Replies:
    0
    Views:
    542
    davout
    Apr 18, 2004
  2. Jeff Rodriguez
    Replies:
    23
    Views:
    1,089
    David Schwartz
    Dec 9, 2003
  3. donet programmer
    Replies:
    1
    Views:
    502
    donet programmer
    Dec 5, 2006
  4. Noel Dolan
    Replies:
    0
    Views:
    217
    Noel Dolan
    Jul 18, 2004
  5. Bitswapper
    Replies:
    5
    Views:
    119
    Prasad, Ramit
    Aug 27, 2013
Loading...

Share This Page