|
查看: 998|回复: 1
|
ASP.net Gridview
[复制链接]
|
|
|
我要把在 table 里的 data, 如此放在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 |
--------------------------------------------------------------------------
LineNo | ItemNo, Qty |ItemNo, Qty
| ItemNo, Qty |
| ItemNo, Qty |
| ItemNo, Qty |
-----------------------------------------------------------------------
LineNo | ItemNo, Qty | ItemNo, Qty |
| ItemNo, Qty | ItemNo, Qty
我有 两个方法。如下:
(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?
我想用方法 二, 可是找不到solution. 在此向大家请教。 |
|
|
|
|
|
|
|
|
|
|
发表于 10-3-2010 01:16 PM
|
显示全部楼层
我要把在 table 里的 data, 如此放在gridview 里。
Data format:
-------------------------------- ...
cheewai 发表于 27-2-2010 11:01 PM 
你要问的是parent-child 的gridview吧?
我只知道可以自己manually做(用html写)或者
是用third-party component 如 Infragistics. |
|
|
|
|
|
|
|
|
| |
本周最热论坛帖子
|