Datagrid/repeater like a report

V

voidfill3d

I do not know if this is possible with a datagrid or a repeater or some
other object, but I am looking to create a report via a table like
structure similar to that of a report you would create in MS Access.
For example:

Category1
----------------------------
ID Name Field1 Field2
1 Bob Data Data
3 Sally Data Data

Category2
----------------------------
ID Name Field1 Field2
2 Greg Data Data
4 Marge Data Data

Instead of the usual:

ID Name Field1 Field2 CategoryName
-------------------------------------------
1 Bob Data Data Category1
3 Sally Data Data Category1
2 Greg Data Data Category2
4 Marge Data Data Category2

I know how I could program it the long way, but I was wondering if
there was a way to do this with a datagrid or a repeater.

Can anyone help me out?

THANKS!
 
V

voidfill3d

Actually, how would I do that since the current CategoryID has to be
thrown into a Stored Procedure (in my case).
 
G

Guest

The source code is available from the sample I gave to you:
http://www.societopia.net/samples/repeater1.aspx

Basically on dataBinding the Repeater items I access the DataItem (which is
the dataRowView) and retrieve the CategoryID associated with that row. I use
that CategoryID to create a new view of the data for the child datagrid.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top