finding a value in a gridview row after a checkbox changes

C

Carlos

Hi all,

I have code that used to work but no longer does when trying to
obtain the value of a field in a gridview. I do try to find the value of
a field when a checkbox in the same row handles the checkedchanged event:
that is:

Public Sub chk_CheckedChanged(ByVal sender As Object, ByVal e As EventArgs)



Dim chk As CheckBox = CType(sender, CheckBox)



Dim objItem As GridViewRow = CType(chk.Parent.Parent, GridViewRow)



Dim iIndx As Integer = objItem.RowIndex

Dim sValue As String = GridView1.Rows(iIndx).Cells(3).Text

I used to find the text for that value at the referenced Row/Cell, but

is now returning empty. I validated that the GridView.Rows.Count has

more than 0 rows, and that the index that I have is valid. Also, there is
data in the cell.



Can somewon help?



Thanks,



Carlos.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top