Home All Groups Group Topic Archive Search About
Author
12 Dec 2005 2:23 PM
Priya
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

Author
12 Dec 2005 6:10 PM
Phillip Williams
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

Show quoteHide quote
"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
>