tags:

views:

101

answers:

2

Hi guys, In my application,i have a gridview in which columns are created at runtime.Actually these columns are created when i am entering data in a database table. My gridview is like this:-

Description | Column1 | Column2 | Column3 | ...... |....... |.........

Input volt | 55 | 56 | 553 |........

Output volt | 656 | 45 | 67 |

where Column1,Column2,column3 may vary during runtime.i need to enter values to these columns during runtime.But i cant bind these columns because these are created during runtime. The first column "Description" will not change.It will remain constant.For each description,there will be values for each column.At last these data will be saved to the database.How to add columns in the gridview during runtime?

A: 

hai nandu, Try ur logic inside row created event of the gridview

Pandiya Chendur
i have edited the last line of my question.Please see
Nandini
A: 

In this case you'll have to manipulate the collection of rows before they are bound to gridview. You add property or a calculated coloumn in results and then bind it to GridView since you are auto-generating coloumns.

this. __curious_geek