GridView, DataSet

Discussion in 'ASP .Net' started by shapper, Sep 14, 2007.

  1. shapper

    shapper Guest

    Hello,

    I have 2 SQL tables as follows:

    [Articles] > ArticleId (PK), Title, Body
    [Categories] > CategoryId (PK), ArticleId (FK), CategoryName

    Basically I want to display a GridView with the articles.
    Then for each article I want to have child gridview with the
    comments.

    I suppose I need to have a dataset with 2 tables, one for Articles and
    other for comments.

    How can I create this in ASP.NET 2.0?
    And how should my SQL 2005 Stored Procedure return the data?

    Thank You,
    Miguel
    shapper, Sep 14, 2007
    #1
    1. Advertising

  2. shapper

    Sam Guest

    You can use one dataset to hold the 2 tables and bind each table to a
    gridview. Your stored procedure would have to return 2 result sets

    Sam


    "shapper" <> wrote in message
    news:...
    > Hello,
    >
    > I have 2 SQL tables as follows:
    >
    > [Articles] > ArticleId (PK), Title, Body
    > [Categories] > CategoryId (PK), ArticleId (FK), CategoryName
    >
    > Basically I want to display a GridView with the articles.
    > Then for each article I want to have child gridview with the
    > comments.
    >
    > I suppose I need to have a dataset with 2 tables, one for Articles and
    > other for comments.
    >
    > How can I create this in ASP.NET 2.0?
    > And how should my SQL 2005 Stored Procedure return the data?
    >
    > Thank You,
    > Miguel
    >
    Sam, Sep 14, 2007
    #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. Nedu N
    Replies:
    1
    Views:
    1,792
    Chris Taylor
    Oct 31, 2003
  2. JimO

    DataSet and dataSet

    JimO, Mar 1, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    518
    Mary Chipman [MSFT]
    Mar 8, 2006
  3. Joseph D. DeJohn

    DataSet to DataSet

    Joseph D. DeJohn, Aug 4, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    394
  4. =?Utf-8?B?bWdvbnphbGVzMw==?=

    GridView Hierarchical View - Gridview in Gridview

    =?Utf-8?B?bWdvbnphbGVzMw==?=, May 9, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    17,960
    =?Utf-8?B?UGhpbGxpcCBXaWxsaWFtcw==?=
    May 9, 2006
  5. mharness
    Replies:
    2
    Views:
    469
Loading...

Share This Page