J
John G
I have a GridView that I've placed a template field into with a single button
that I want to be able to click that will update just the row the button is
located. This is all while in regular view mode (not edit mode).
I found a piece of VB code that sort of works but it goes through a loop and
updates the same field in every row.
Can anyone help me make this code only affect the current row?
Protected Sub btnReturn_Click(ByVal sender As Object, ByVal e As
System.EventArgs)
Dim row As GridViewRow
For Each row In gvRAMI.Rows
Dim test As CheckBox = CType(row.FindControl("CheckBox1"),
CheckBox)
If test.Checked = True Then
test.Checked = False
gvRAMI.UpdateRow(row.RowIndex, False)
End If
Next
End Sub
TIA
that I want to be able to click that will update just the row the button is
located. This is all while in regular view mode (not edit mode).
I found a piece of VB code that sort of works but it goes through a loop and
updates the same field in every row.
Can anyone help me make this code only affect the current row?
Protected Sub btnReturn_Click(ByVal sender As Object, ByVal e As
System.EventArgs)
Dim row As GridViewRow
For Each row In gvRAMI.Rows
Dim test As CheckBox = CType(row.FindControl("CheckBox1"),
CheckBox)
If test.Checked = True Then
test.Checked = False
gvRAMI.UpdateRow(row.RowIndex, False)
End If
Next
End Sub
TIA