Hi,
that data row item (DataRowView in this case) exists only when dataBind is
called (on the same request after you call dataBind for the control) and due
to performance reasons it doesn't exist at postback (the repeater row
controls are recreated on postback and viewstate restored to them)
You could store IDs of the row into the repeater's row (item) with TextBoxes
or literal controls having Visible="False" so that they'd be carried with
the ViewState. When you need the keys, locate the controls in the same row
(you can access the RepeaterItem via TextBox's NamingContainer property) and
read the keys from them.
--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke
"guoqi zheng" <no@sorry.com> wrote in message
news:2b******************************@ureader.com. ..
Dear sir,
I have a textbox inside a repeart control, autopostback set to true for
that
textbox. When the value of this textbox changes, I need to access current
row and update database.
Repeater is bind to a dataset. VS.NET generate a below event on double
click.
However, I did not see any way to access current row.
Public Sub TxtQuantity_TextChanged(ByVal sender As Object, ByVal e As
System.
EventArgs)
response.write("it is here")
End Sub
How can access the datarow on repeater for that event???
regards,
Guoqi Zheng
http://www.ureader.com