T
Tim
Hello,
I have an aspx page that presents two datagrids to the user. These
datagrids contain 2 bound columns that are populated from an Oracel db
when the grid is bound. It also contains three template columns that
have textboxes defined in the itemtemplate section so that they appear
for every line in the grid.
The users can enter numbers in these textboxes and then hit "next
screen" at the bottom of the page. When this happens I need to be able
to read these values and store them in session variables.
I am using this code to read the values in the next screen click
event:
---------------------------------------------------
For Each dgItem In DataGrid1.Items
strdata = dgitem.Cells(0).Text
strdata += dgItem.Cells(1).Text & "~"
strdata += CType(dgItem.FindControl("lbldesc1"), Label).Text & "~"
strdata += CType(dgItem.FindControl("grd1_qty_ord"), TextBox).Text &
"~"
next
----------------------------------------------------
Values are returned for the first three items because this data is
loaded during the bind. But it always returns nothing for the textbox
even if I put data in it.
Do I need to somehow save this data the user enters in the datagrid?
I can't re-bind the datagrid as that will erase what is in the
textboxes.
Thanks,
I have an aspx page that presents two datagrids to the user. These
datagrids contain 2 bound columns that are populated from an Oracel db
when the grid is bound. It also contains three template columns that
have textboxes defined in the itemtemplate section so that they appear
for every line in the grid.
The users can enter numbers in these textboxes and then hit "next
screen" at the bottom of the page. When this happens I need to be able
to read these values and store them in session variables.
I am using this code to read the values in the next screen click
event:
---------------------------------------------------
For Each dgItem In DataGrid1.Items
strdata = dgitem.Cells(0).Text
strdata += dgItem.Cells(1).Text & "~"
strdata += CType(dgItem.FindControl("lbldesc1"), Label).Text & "~"
strdata += CType(dgItem.FindControl("grd1_qty_ord"), TextBox).Text &
"~"
next
----------------------------------------------------
Values are returned for the first three items because this data is
loaded during the bind. But it always returns nothing for the textbox
even if I put data in it.
Do I need to somehow save this data the user enters in the datagrid?
I can't re-bind the datagrid as that will erase what is in the
textboxes.
Thanks,