These properties will automatically render Edit, Update and Cancel buttons inside Grid View column.
Last line of the following code is calling a local method for updating the database and passing all the parameters to this method.
Please keep in mind that there are many different ways to update the database using the Grid View control depending on the type of data you are updating and the functionality the user need and there are many solutions to achieve the same end result.
To get the Primary Key reference we can use the Data Keys collection of the Grid View.
This collection only requires the row index no and it will give us the primary key.