Hi
I am using sqlserver 2005 as my database.
I have a datagridview in which i have displayed three columns of data from database as id, firstname,lastname and in the fourth column of datagridview i have a button.When i click the button i will get a new form where i edit those details.
My problem is how can i get the value of the id of the row of the button i have clicked.
If i get the id of that particular record(row in the datagridview) i want to edit i can update it in the database.
So please can anybody give me the code snippet for getting the id value of that particular row whose button i have clicked.
I am using sqlserver 2005 as my database.
I have a datagridview in which i have displayed three columns of data from database as id, firstname,lastname and in the fourth column of datagridview i have a button.When i click the button i will get a new form where i edit those details.
My problem is how can i get the value of the id of the row of the button i have clicked.
If i get the id of that particular record(row in the datagridview) i want to edit i can update it in the database.
So please can anybody give me the code snippet for getting the id value of that particular row whose button i have clicked.