I want to add a column to a gridview which contains button control. I am using ID(integer and primary key) as the 1st column of Gridview. What I want is that when a user clicks the button on any given row of gridview, I want to able to determine the ID of the row to which the clicked button belongs
Vam Yip
In the template for your grid view, bind The CommandArgument property of the button to the ID of the row. Then on the button click event, check the commandArgument property from the event args. This will give you the ID