Click here to Skip to main content
15,911,646 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Friends,

I have to add columns to a data grid dynamically on the click of a button. That i have done and bind the data to it but when i am trying to add a checkbox column to it dynamically to each and every data bound i am not able to do that.

I think when i am binding the data to the GridView it is actually binding data to the column not in the row that's why i am not able to see any checkbox. Is that so or it is something else i am doing wrong.?

Please help me in this regard.

Thanks

Varun Sareen
Posted

1 solution

Take a look at the codeproject article by Devakumar Sai Chinthala. This explains how to add and bind various types of columns dynamically.

How to create custom bound fields in GridView[^]

Also, you can refer following for templated columns:
How to create template columns dynamically in a grid view[^]
 
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