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. Advertisements

  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. Advertisements

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. JemPower
    Replies:
    0
    Views:
    759
    JemPower
    Aug 29, 2003
  2. Craig Buchanan

    datagrid grouping?

    Craig Buchanan, Dec 3, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    462
    Craig Buchanan
    Dec 3, 2003
  3. Gilles Kuhn
    Replies:
    0
    Views:
    570
    Gilles Kuhn
    Sep 15, 2003
  4. William Gower

    Can grouping be done with datagrid

    William Gower, Apr 25, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    2
    Views:
    210
    Scott Mitchell [MVP]
    Apr 25, 2004
  5. RG

    Wrapping and grouping headers in DataGrid

    RG, Jul 16, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    199
  6. Sheikh Nabeel Moeen

    Grouping RadioButtons in a DataGrid

    Sheikh Nabeel Moeen, Sep 15, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    238
    Sriram Mallajyosula
    Sep 22, 2004
  7. Martin Hoffmann

    Performant DataGrid with grouping capabilities for ASP.NET?

    Martin Hoffmann, Nov 10, 2004, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    218
    Martin Hoffmann
    Nov 10, 2004
  8. Replies:
    1
    Views:
    1,443
Loading...