Skip to content

How to add colum in gridview button click

vikas kanani

Asked Mar 2, 2013, 1:18 AM EST1 answer
Share
LinkedInX
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...

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    Hi,

    To add columns dynamically on button click on any row button you can try following code
    Code
    BoundField boundField = new BoundField();
    boundField .DataField = "YourField";
    boundField .HeaderText = "NewHeader";
    GridView1.Columns.Add(boundField);
    0