Hi,
The gridview contains 7 fields (i can see them with data on screen). The
last is a
checkbox and the first six are textfields.
I did this: (just a sample code: without the
line"a=e.Row.Cells(0).Controls(0)", it works , but with that line, i get the
error:
"Specified argument was out of the range of valid values. Parameter
name:index").
The checkbox is recognized, but not the textfields.
Protected Sub GridView1_RowDataBound(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.GridViewRowEventArgs) Handles
GridView1.RowDataBound
If e.Row.RowType = DataControlRowType.DataRow Then
Dim a As TextBox
Dim cb As CheckBox
a=e.Row.Cells(0).Controls(0) 'error also with
Cells(1 till 5)
cb = e.Row.Cells(6).Controls(0) 'this works
end if
end sub
Maybe are these texrfield not 'textbox'? But then, what are they? How can i
know that?
Thanks