how to add colum in gridview button click
how to add colum in gridview button click.....example i have 100 rows...each row i have button..suppose i click on 5th record buton in gridview..then i want to seee 3 new colum name..how can i do...
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
piyush mallPosted Mar 6, 2013, 12:10 AM
To add columns dynamically on button click on any row button you can try following code
BoundField boundField = new BoundField();
boundField .DataField = "YourField";
boundField .HeaderText = "NewHeader";
GridView1.Columns.Add(boundField);