D
David C
Using ASP.Net 2.0 and VS2005. I have a GridView that is bound to an
SqlDataSource and I want to get and hold the previous value of a bound
control on the row I am editing. Below is what I am trying but the
txtOldValue.Text is not getting populated. How can I get this to work
and/or is there a better way? Thanks.
David
Sub SubfilesGridView_RowEditing(ByVal sender As Object, ByVal e As
GridViewEditEventArgs)
' Get the seq# for the row being edited.
' SeqNo is contained in the 2nd column (index 1).
Dim strseqno As String = SubfilesGridView.Rows(e.NewEditIndex).Cells(1).Text
'Put old seqno into form field
txtMsg.Text = ""
If strseqno <> "" Then
e.Cancel = True
txtOldValue.Text = strseqno
Else
'e.Cancel = True
txtOldValue.Text = ""
End If
MultiView1.ActiveViewIndex = 0
End Sub
SqlDataSource and I want to get and hold the previous value of a bound
control on the row I am editing. Below is what I am trying but the
txtOldValue.Text is not getting populated. How can I get this to work
and/or is there a better way? Thanks.
David
Sub SubfilesGridView_RowEditing(ByVal sender As Object, ByVal e As
GridViewEditEventArgs)
' Get the seq# for the row being edited.
' SeqNo is contained in the 2nd column (index 1).
Dim strseqno As String = SubfilesGridView.Rows(e.NewEditIndex).Cells(1).Text
'Put old seqno into form field
txtMsg.Text = ""
If strseqno <> "" Then
e.Cancel = True
txtOldValue.Text = strseqno
Else
'e.Cancel = True
txtOldValue.Text = ""
End If
MultiView1.ActiveViewIndex = 0
End Sub