This is a migrated thread and some comments may be shown as answers.

[Solved] Adding Columns Dynmically

2 Answers 90 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
spam
Top achievements
Rank 1
spam asked on 13 Dec 2010, 07:01 PM

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

 

 

2 Answers, 1 is accepted

Sort by
0
Vanya Pavlova
Telerik team
answered on 14 Dec 2010, 01:33 PM
Hello Spam,


You may use the approach demonstrated in the following blog post.
Please let me know how this works for you.

Regards,
Vanya Pavlova
the Telerik team
Browse the videos here>> to help you get started with RadControls for Silverlight
0
spam
Top achievements
Rank 1
answered on 15 Dec 2010, 07:25 AM
Hi Vanya,

Can you point me to the portions relevant to me from your example? I'm a bit new & the code you mentioned is pretty complex to

Thanks for your time,

Spamproof
Tags
GridView
Asked by
spam
Top achievements
Rank 1
Answers by
Vanya Pavlova
Telerik team
spam
Top achievements
Rank 1
Share this question
or