Pump data by row and column to dynamic created column in gridview

Joined
Feb 24, 2010
Messages
2
Reaction score
0
I have data in table that need to display to user in such a format in gridview.

Data format:

-----------------------------------------------------------------------
LineNo |DateDay |Date |Shift |Project No|ItemNo|ItemQty| AvailHr
-----------------------------------------------------------------------
1.1 |Monday |1/2/2010 |x1 |y1 | z1 | 100 | 0.5
1.1 |Monday |1/2/2010 |x1 |y1 | z2 | 150 | 0.2
1.1 |Monday |1/2/2010 |x1 |y1 | z3 | 120 | 0.3
1.1 |Monday |1/2/2010 |x2 |y2 | z4 | 105 | 0.1


2.1 |Tuesday |2/2/2010 |x1 |y1 | z1 | 100 | 0.5
2.1 |Tuesday |2/2/2010 |x1 |y1 | z2 | 150 | 0.9
2.1 |Tuesday |2/2/2010 |x1 |y1 | z3 | 120 | 0.7
2.1 |Tuesday |2/2/2010 |x2 |y2 | z4 | 105 | 0.1




Gridview Format:

--------------------------------------------------------------------------
| Monday | Tuesday
--------------------------------------------------------------------------
| 1/2/2010 | 2/2/2010
--------------------------------------------------------------------------
| X1 | X2 | | x1 | x2|
--------------------------------------------------------------------------
1.1 | ItemNo: z1 | Qty=100
| ItemNo: z2 | Qty=150
| ItemNo: z3 | Qty=120
Ttl Avail Hr:1.0

--------------------------------------------------------------------------
2.1 | ItemNo: z1 | Qty=100


I have 2 solution on this:

(1). Create dynamic column for datatable that just suit to the gridview structure and then change the column header text accordingly when display to user.

(2).Create dynamic column in gridview and pump data by row and column accroding to the gridview column header text.

I prefer the second way to do it.but find no ways to pump in the data by row and column into the gridview.
I have find ways to create dynamic column but no ways to pump in the data to gridview row by row.Does anyone has idea on this?
 

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

Members online

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top