By Default, Grid View control displays Item Template which directly shows the Product Name and Unit Price columns but when user clicks Edit button Grid View automatically switches to Edit Item Template and display the control available inside Edit Item Template for user editing.
Now I will show you the C# code behind file of the above ASP.
A friend asked me to help him out on this and frankly it has me completely stumped as well.
I have a Grid View control and use old style manual binding with a Data Source property and invoke the Data Bind() method.
These properties will automatically render Edit, Update and Cancel buttons inside Grid View column.
I am using Template Field’s Item Template and Edit Item Template for providing read only and editing interface of the same column in the Grid View.
Row Index = 0 Then 'Creating a hashtable and store data to it Dim hsh As New System.
'As in this code, I have a Sub named Add Store Record which takes a hastable as argument and insert a new record to DB.
Since we know that hte empty row is on the very top (row zero), so we mainly interested in that row.