trying to get the row Id and then the REcord ID to delete a record form the gridview. I am trying to pass the Row Id to a variable the trying to get eth value of the Record ID out of a cell called "ID"
DougP
Code:
Protected Sub GridView2_RowDeleting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GridView2.RowDeleting
Dim RetVal As String
RetVal = MsgBox("Are you sure you want to delete record?", vbInformation + vbYesNoCancel, "Confirm Delete Record")
If RetVal = vbYes Then
Dim RowID As Object = GridView2.Rows(e.RowIndex)
Session("EditSQLRecordID") = GridView2.Rows(RowID).FindControl("ID")
'delete record calling the function which calls the stored procedure
sp_SOWDeleteOneTimeReportingRecord(Session("EditSQLRecordID"))
Me.GridView2.DataBind()
End If
End Sub
DougP