I've configured the Grid to allow Multiple updates by replacing the default Label Controls with Template Fields using the approach described here: Bulk Updates to Rows Bound to a Grid View Everything was working fine, until I made a change to bind the Gridview query programmatically on page load (With the aim of making the Gridview display different data depending on the user currently viewing the page) as described here: Bind Gridview programmatically. Page Protected Sub Page_Load(By Val sender As Object, By Val e As System. Load If Not Is Post Back Then gvbind() End If End Sub Public Sub gvbind() Dim Sql Data Source1 As New Sql Data Source() Sql Data Source1. After making this change the page now throws the following error when the user makes changes and clicks the update button: I have read many threads on similair problems but I can't seem to find a solution to my error. Here's the Code: Public Class Input Inherits System. Raise Post Back Event(String event Argument) 205 System. Raise Post Back Event(String event Argument) 13 System.
The HTML code for the Grid View is as follow : Till now everything looks fine but the problem arises when you run this application. Text End Sub " Select Command="SELECT Distinct [rownum],[reqnum], [reqrecdate], [reqrecfrom], [skillsets], [application], [hoursperweek], [fromdate], [todate], [status], [statusupdate], [statusupby] FROM [Term] ORDER BY [reqnum]" Update Command="INSERT INTO Term(reum, reqrecdate, reqrecfrom, skillsets, application, hoursperweek, fromdate, todate, status, statusupby, statusupdate) VALUES (@reum,@reqrecdatelbltxt, @reqrecfromlbltxt, @skillsets, @application, @hoursperweek,@fromdate,@todate, @status, @lognametxt, @logdatetxt)" @Damien, problem is that it doesn't matter whether it is an update statement with Update Command or Insert statement with Insert Comment or Insert statement with Update Command, it still doesn't save the data into the database.I have a Gridview on an ASP page bound to an SQL table. Welcome to the Coding Forums, the place to chat about anything related to programming and coding languages.Please join our friendly community by clicking the button below - it only takes a few seconds and is totally free.