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.
I suspect this is because I am using the GUI and this will require some code per coloumn?
Error[Http Exception (0x80004005): The Grid View 'Grid View1' fired event Row Editing which wasn't handled.] System.
In any case I added the empty handlers as follows: Protected Sub Gridview1_Row Updating(By Val sender As Object, By Val e As System.
With thanks to Azim for helping me previously I near have a near full functioning form. However upon applying the Edit, Update Cancel I get the following.
Click original Data Table = CType(View State("original Values Data Table"), System. Data Table) For Each r As Grid View Row In Grid View1.
Copy() View State("original Values Data Table") = original Data Table table Copied = True End If End If End Sub Protected Sub Up_Click(By Val sender As Object, By Val e As Event Args) Handles Up. Row Index, False) Next ' Rebind the Grid to repopulate the original values table. Data Bind() End Sub Protected Function Is Row Modified(By Val r As Grid View Row) As Boolean Dim current ID As Integer Dim current Project As String Dim current Description As String Dim current CAPEX As String current ID = Convert.
Raise Post Back Event(String event Argument) 205 System.
Raise Post Back Event(String event Argument) 13 System.
Raise Post Back Event(IPost Back Event Handler source Control, String event Argument) 13 System.
Raise Post Back Event(Name Value Collection post Data) 9671830 System.
C# codebehind - I'm not really deleting the row from the database but it's a test: protected void Orders Grid View_Row Deleted(object sender, System. It looks like you are handling the "onrowdeleted" event, not the "Row Deleting" event in your markup, change: onrowdeleted="Orders Grid View_Row Deleted" to Row Deleting="Orders Grid View_Row Deleting" Look a the docs for this event: you will also see that your handler's signature will need to change: msdn.microsoft.com/en-us/library/system.... The Row Deleting probally lets you Cancel the event.