datagrid value grouping

Discussion in 'ASP .Net Web Controls' started by Priya, Dec 12, 2005.

  1. Priya

    Priya Guest

    Hi,

    I need a help.
    I'm creating a datagid .
    It has 4 columns.
    On the page load event I called the stored procedure which returns 7 fields
    out of which i should display 4 columns.
    First column was has radiobutton, second,third & 4 th are labels.
    the value returned by stored procedure is got in a typed dataset.
    There is a field called group id , based on this i need to group rows in
    datagrid.If a particular group id exists for more than 1 the seond column of
    the datagrid alone has multiple values seperated by lines , 1st , 3rd & 4th
    columns have single value.
    How can I do this.
    Thanks in advance

    Regards
    Priya
    Priya, Dec 12, 2005
    #1
    1. Advertising

  2. Hi Priya,

    I would separate the data out of the datatable into 2 dataviews before I
    databind to a server control, e.g. as I did in this datalist sample:
    http://www.societopia.net/Samples/DataList_Hierarchy.aspx

    If you are using ASP.NET2.0 then you may find that grouping child records
    within parent records a much easier task to accomplish declaratively (with
    only a couple of lines in the code behind) as I did in this demo:
    http://www.webswapp.com/CodeSamples/aspnet20/GridView_1c.aspx

    --
    HTH,
    Phillip Williams
    http://www.societopia.net
    http://www.webswapp.com


    "Priya" wrote:

    > Hi,
    >
    > I need a help.
    > I'm creating a datagid .
    > It has 4 columns.
    > On the page load event I called the stored procedure which returns 7 fields
    > out of which i should display 4 columns.
    > First column was has radiobutton, second,third & 4 th are labels.
    > the value returned by stored procedure is got in a typed dataset.
    > There is a field called group id , based on this i need to group rows in
    > datagrid.If a particular group id exists for more than 1 the seond column of
    > the datagrid alone has multiple values seperated by lines , 1st , 3rd & 4th
    > columns have single value.
    > How can I do this.
    > Thanks in advance
    >
    > Regards
    > Priya
    >
    Phillip Williams, Dec 12, 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. David Wier
    Replies:
    0
    Views:
    438
    David Wier
    Aug 8, 2003
  2. S. Justin Gengo
    Replies:
    0
    Views:
    1,786
    S. Justin Gengo
    Aug 8, 2003
  3. JemPower
    Replies:
    0
    Views:
    668
    JemPower
    Aug 29, 2003
  4. Craig Buchanan

    datagrid grouping?

    Craig Buchanan, Dec 3, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    385
    Craig Buchanan
    Dec 3, 2003
  5. Gilles Kuhn
    Replies:
    0
    Views:
    424
    Gilles Kuhn
    Sep 15, 2003
Loading...

Share This Page