佳礼资讯网

 找回密码
 注册

ADVERTISEMENT

查看: 998|回复: 1

ASP.net Gridview

[复制链接]
发表于 27-2-2010 11:01 PM | 显示全部楼层 |阅读模式
我要把在 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. 在此向大家请教。
回复

使用道具 举报


ADVERTISEMENT

发表于 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.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

 

ADVERTISEMENT



ADVERTISEMENT



ADVERTISEMENT

ADVERTISEMENT


版权所有 © 1996-2023 Cari Internet Sdn Bhd (483575-W)|IPSERVERONE 提供云主机|广告刊登|关于我们|私隐权|免控|投诉|联络|脸书|佳礼资讯网

GMT+8, 26-11-2025 11:34 PM , Processed in 0.130921 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表