Gridview templatefield not updating post dating an email
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.
Now I will show you the C# code behind file of the above ASP.
NET page that will handle different Grid View events to provide complete editing functionality.
I will call that field “Number Of Reviews” and i can do that by modifying the Select Command of the Sql Data Source as follow. By using the Grid View Row object we can find the reference of any control in the row in which user is editing the data.In this tutorial we are searching for our Text Box controls txt Product Name and txt Unit Price.We configured though the Edit Item Template of the Template Field, to contain two other Link Button controls, with Command Name “Update” and “Cancel”. If so, i just disable the linkbutton and finally, you can’t press it.They work in similar and respective way as the “Edit” command. Go to Grid View’s code add a handler for the On Row Data Bound like this.