Hi -
I have a Gridview displaying records from a complex query containing several joins and a UNION. Consequently I have to manage edits to this data manually. I expect to do this in the Gridview_RowUpdating event. After I have handled the edit, I need to cancel the Gridview's attempt to write to the underlying tables. I find that e.Cancel leaves the Gridview in editing mode. What is the proper way to cancel the automatic edit and return the Gridview to readonly mode?
Private Sub GridView1_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GridView1.RowUpdating
Dim myTable As String = e.OldValues.Item("sourcetable")
Dim myRecord As Int16 = e.OldValues.Item("KeyID")
Dim newStatus As String = e.NewValues.Item("RTAStatus")
MsgBox(myTable + ", " + myRecord.ToString + ", " + newStatus)
e.Cancel = True
End Sub
Thanks