473,396 Members | 1,738 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Textbox inside a repeater. how to access datarow in post back event.

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
Nov 19 '05 #1
1 2174
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

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Scott Schluer | last post by:
Hi All, I have a functioning datagrid on "Page 1" that displays order information for a single order (this is for an e-commerce site). It's actually a combination of a couple datagrids to...
1
by: MattB | last post by:
OK, never mind my last post. It was easy enough to refer to the table the repeater is bound to, but I made a big, incorrect assumption in that post. In my last post I thought I was successfully...
3
by: JD | last post by:
Hello, I have a problem with checkboxlist inside Repeater (in ASP.NET page). I am able to create Checkboxlist and bind it (inside Repeater_ItemBound - including setting checked/unchecked)....
3
by: Leigh Webber | last post by:
I have an HTMLAnchor control on my aspx page. When it's not inside a repeater, it works fine. When I put it inside a repeater control, the handler never gets fired. I have a handler for the...
3
by: Joel Daniels | last post by:
Hello, I am trying to determine the proper way to access the underlying data row for a Repeater item in the ItemCommand event. In the page load event, I bind the Repeater data source to a...
8
by: I am Sam | last post by:
Hi everyone, This problem is making me old. I don't want to get any older. I have a multi-nested repeater control as follows: <asp:Repeater ID="clubRep1" Runat="server">...
1
by: Jeremy | last post by:
Hello All, I have a Repeater which contains a Dynamic DropDownList within its itemtemplate. I know I have struggled with this before and I am pretty sure I had to save a bunch of crap manually...
8
by: fernandezr | last post by:
I would like to use a user control as a template inside a repeater. Some of the fields in the control should be hidden depending on whether or not there is data. I'm still a ASP .Net newbie so the...
1
by: Annyka | last post by:
I've got a button inside a Repeater control Item Template I'm doing a SQL insert using a SqlDataSource Control based on the RepeaterName_ItemCommand event, since the button in the template isn't...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.