ASP.Net GridView control provides a CommandField which can be handled at server side using VB.Net code that enables you to display the Edit, Update and Cancel Command buttons and perform their associated actions. You can easily attach the GridView events in the VB.Net code such as RowEditing, RowCancelingEdit and RowUpdating to implement the edit, update and cancel commands of GridView control.
Command Events Used
GridView Property Used
The DataKeys property of GridView control enables you to hold the unique identifier values for each row generated inside it. The DataKey value can be retrieved using VB.Net for the associated row item that can be used to perform the edit and update action for that particalur row item in the database as well.
Try the sample below to understand the functionality developed using VB.Net code for GridView Control's Edit Update Cancel Commands in ASP.Net: