Many a times in our applications we use primary keys to get control of the particular record in the gridview. For this situation, many developers use invisible columns (Hidden columns) in the gridview to identify that row.
, it's supposed to compare with the value of column 0 row by row, if id matched, then the check box will be marked.
However, I did not display an id column in my grid view but I set it as Data Key value.
Go to property builder by right click on Grid View - Edit Columns.
Uncheck Auto-Generate Field from the Property window.
I want to get new value of the text box when i update row using rowupdating event.
But, I have my grid in Updatepanel and i don't want to remove it in any case..Take a look at the page load if you are binding on post back then the values get updated before you are able to access them.One thing you should be careful with your apporach is, if you have paging in your gridview, and if you are in a different page, you might end up pulling out wrong row or the row might not be found.string connetion String = "YOUR_CONSTR" ; string upd Stmt = "UPDATE Quantity set [email protected]_pro4, [email protected]_pro5, [email protected]_profile5 " "where [email protected] Name"; using (Sql Connection cnn = new Sql Connection(connetion String)) I have tested this code, and it reads the table, and allows the edits of the records. Make sure the parameters on the update match the field names (@branch Name, @Parent Id). Major concern with any data entry form is Add, Edit, Delete and View.