Click here to Skip to main content
15,890,557 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have the two drop down. both contain 1-2006 to 53-2008 (Week and Year) values.

If i select my dropdown 1-2006 (Dropdown1) to 5-2008 (Dropdown2) then my gridview column should generate 1-2006,2-2006 till 53-2008 (inluding leap week's).

How..?

Regards,
Ganesh.S
Posted

1 solution

If you are pulling data from the database that reflects your selections, then databinding then your auto column generation in the gridview can do that when you bind data.
If you are doing everything manually, then you will need to turn off auto column generation and in your code behind you will need to create the columns manually based on the selections. My suggestion would be to subclass the GridView with a custom implementation that does all this for you so that you just have to seed it with a start and end week and the grid will process it on its own from there.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900