473,405 Members | 2,187 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Datagrid/repeater like a report

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!

Nov 19 '05 #1
4 1033
A DataGrid within a Repeater if you intend to move between pages on the
report would work fine: http://www.societopia.net/samples/repeater1.aspx.

If your report is static (no pagination) then you can simply use a repeater
within a repeater. You still need to program the OnItemDataBound event to
select the category.

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

"vo********@yahoo.com" wrote:
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!

Nov 19 '05 #2
THANKS. I should have thought of that!

Nov 19 '05 #3
Actually, how would I do that since the current CategoryID has to be
thrown into a Stored Procedure (in my case).

Nov 19 '05 #4
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.
--
Phillip Williams
http://www.webswapp.com
"vo********@yahoo.com" wrote:
Actually, how would I do that since the current CategoryID has to be
thrown into a Stored Procedure (in my case).

Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jeremy Ames | last post by:
I am trying to use a datagrid to pull information from a database. I prefer to use latebinding to this. Well, I finally got my information to populate the datagrid, but the information came out in...
2
by: Stephen Miller | last post by:
I am using the OnItemDataBound event of Repeater control to nest a DataGrid within the Repeater. When I attempt to bind to the DataGrid using the DataSource method I get the error message "Object...
1
by: Rick | last post by:
Hello all, I hope all is well with you. I am having a seriously difficult time with this problem. Allow me to set up the problem. I have a System.Web.UI.Page with the following controls...
7
by: Scott Schluer | last post by:
Hi All, I have a functioning datagrid on "Page 1" that displays order information for a single order (this is for an e-commerce site). It's actually a combination of a couple datagrids to...
2
by: News | last post by:
Hi I need help to display and edit data in a data grid within a repeater. The code is below: Sub dgrdEvents_EditCommand(sender As Object, e As DataGridCommandEventArgs)...
1
by: Christiaan Nieuwlaat | last post by:
Hi everyone, Could you please help me with this? I need to create a table in which resultdata from a sql server table can be shown and/or edited by using controls, for instance the radiobutton....
1
by: JD | last post by:
Hello Everyone, I am trying to do a page where when the user gets to the page it will look very similar to the following: <table border=1> <tr> <td bgcolor="green" colspan="2">Main...
3
by: renil | last post by:
I have a repeater control that displays info. from a datatable. Each row in the repeater has a checkbox. Also, I have a delete linkbutton outside the repeater control. What I'm trying to do when...
2
by: mark4asp | last post by:
This page is currently using a Repeater control to create a table with 6 columns. The first column has 2 ImageButton controls and a common header. How can I do this with a DataGrid ? I need...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.