I am trying to create a gridview dynamically that will have multiple date columns with a List<DrawFields>. Each DrawFields contains:
Zone, PubDate , Qty
Zones can have multiple pub dates so the data is currently come out like this in my grid (1st row is the header).
Zone,PubDate,Qty
DXXX, 12/17/2010, 6500
DXXX,12/24/2010, 6500
DYYY, 12/17/2010, 4900
DYYY,12/24/2010, 4900
What I want it to dynamically create date columns so the output is like this (1st row is the header)….
Zone,12/17/2010,12/24/2010
DXXX, 6500, 6500
DYYY, 4900, 4900
I know how to create the columns but I get stuck passing in the values. The other important this that I can’t change List<DrawFields> b/c that structure is used elsewhere.
Can some show me some sample code that does this?
Thank you,
Spamproof