– Grid view – Column – Education Career Blog

I am creating an application in used a grid view to show the datas .. By using the autogenerate columns

I bind the datas to the gridview.. Now i want to make a edit button at the end ..By clicking that the user can edit their details …

But i need to count the number of columns in a row to make a pop up window to edit the details.. How to find out the number of columns in a autogenerated grid..Number of columns varies depend upon the user..So how to find the number of columns..


You will get the no of columns through like this

int NoOfColumns=GridView1.Rows0.Cells.Count;


You can find,
How many columns are in gridview with


How many cells are in one row of gridview with


Best Regards

Leave a Comment