using the yellow code I get error
Object reference not set to an instance of an object.
using the green code I get error
Value of type 'System.Web.UI.WebControls.GridViewRow' cannot be converted to 'Integer'
I got this off some site which was written in c# originally
Is there a way to convert "row" so it will work?
DougP
Object reference not set to an instance of an object.
using the green code I get error
Value of type 'System.Web.UI.WebControls.GridViewRow' cannot be converted to 'Integer'
I got this off some site which was written in c# originally
Is there a way to convert "row" so it will work?
Code:
Private Sub GridView1_RowUpdating(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GridView1.RowUpdating
'Retrieve the table from the session object.
Dim dt = CType(Session("AwardType"), DataTable)
'Update the values.
Dim row = GridView1.Rows(e.RowIndex)
dt.Rows(row.DataItemIndex)("UniqueID") = GridView1.Rows([highlight #FCE94F]GridView1.SelectedIndex[/highlight]).Cells(2).Text
dt.Rows(row.DataItemIndex)("UniqueID") = GridView1.Rows([highlight #8AE234]row[/highlight]).Cells(2).Text
dt.Rows(row.DataItemIndex)("AwardTypes") = GridView1.Rows(GridView1.SelectedIndex).Cells(1).Text
'Reset the edit index.
GridView1.EditIndex = -1
'Bind data to the GridView control.
GridView1.DataBind()
End Sub
DougP