473,387 Members | 1,364 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,387 software developers and data experts.

Getting row data from listbox event in repeater.

Hi,

I'm sure there must be any easy way of doing this, but I just can't
see it:

I have a repeater bound to a dataset. In each item of the repeater I
have a listbox with a few options. I want to be able to access the
repeater's row data from inside the method wired up to the listbox's
OnItemIndexChanged event. Is this possible?

Thanks!
Nov 19 '05 #1
3 1744
Yes. You need to navigate in ItemTemplate. The event handler gets a
reference on the object that generated the event. You need to understand the
object hierarchy and operate with properties Parent and Controls.
FindControl() method is also useful.

Eliyahu

"Sosh" <so**@nospampls.com> wrote in message
news:4f********************************@4ax.com...
Hi,

I'm sure there must be any easy way of doing this, but I just can't
see it:

I have a repeater bound to a dataset. In each item of the repeater I
have a listbox with a few options. I want to be able to access the
repeater's row data from inside the method wired up to the listbox's
OnItemIndexChanged event. Is this possible?

Thanks!

Nov 19 '05 #2
Thanks Eliyahu. Could you give me an example of how I access the
parent repeater row using the listbox sender object in the wired up
method?

On Tue, 28 Jun 2005 14:11:50 +0200, "Eliyahu Goldin"
<re*************@monarchmed.com> wrote:
Yes. You need to navigate in ItemTemplate. The event handler gets a
reference on the object that generated the event. You need to understand the
object hierarchy and operate with properties Parent and Controls.
FindControl() method is also useful.

Eliyahu

"Sosh" <so**@nospampls.com> wrote in message
news:4f********************************@4ax.com.. .
Hi,

I'm sure there must be any easy way of doing this, but I just can't
see it:

I have a repeater bound to a dataset. In each item of the repeater I
have a listbox with a few options. I want to be able to access the
repeater's row data from inside the method wired up to the listbox's
OnItemIndexChanged event. Is this possible?

Thanks!


Nov 19 '05 #3
Alternatively, is there any way of getting the listbox
OnItemIndexChanged event to cause the Repeater OnItemCommand event to
fire, so that I then have access to the RepeaterCommandEventArgs?

Thanks

On Tue, 28 Jun 2005 14:11:50 +0200, "Eliyahu Goldin"
<re*************@monarchmed.com> wrote:
Yes. You need to navigate in ItemTemplate. The event handler gets a
reference on the object that generated the event. You need to understand the
object hierarchy and operate with properties Parent and Controls.
FindControl() method is also useful.

Eliyahu

"Sosh" <so**@nospampls.com> wrote in message
news:4f********************************@4ax.com.. .
Hi,

I'm sure there must be any easy way of doing this, but I just can't
see it:

I have a repeater bound to a dataset. In each item of the repeater I
have a listbox with a few options. I want to be able to access the
repeater's row data from inside the method wired up to the listbox's
OnItemIndexChanged event. Is this possible?

Thanks!


Nov 19 '05 #4

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

Similar topics

0
by: hendrik.vanniekerk | last post by:
Hi I'm using a repeater control doing databinding to an array at runtime. I have created a Template class for creating Headertemplate Itemtemplate etc. creating databinding at runtime. It...
2
by: John Holmes | last post by:
I am using radioButton controls in a data repeater and would like to incorporate the 'key' field into the 'id' attribute of the radioButton controls and name them something like: 'rad' + '<%#...
0
by: Backslider | last post by:
I have a Listbox inside a Repeater control. I have AutoPostBack set to True. How do I handle the event? It doesn't apparently call the ItemCommand event, as a button would do. What event should...
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...
7
by: charliewest | last post by:
Hello - I'm using a Repeater control to render information in a very customized grid-like table. The Repeater control is binded to a DataSet with several records of information. Within the...
4
by: darrel | last post by:
I have a repeater that I'd like to apply some logic to, namly highlighting the top few items in the repeater. To do this, I need to determine the record count. I've tried this: <% dim...
4
by: jim.long | last post by:
I can't seem to get the checked value from the checkboxes! Is there something wrong with the code? It loops through the repeater item collection correctly. HTML: <asp:repeater id="rPrinterJobs"...
2
by: koonda | last post by:
Hi all, Currently I am doing a project in ASP.NET using C#. I posted this message before but that was a different approach. Now I want to implement it this way. I have a Database in SQL Server...
3
by: koonda | last post by:
Hi Guys, I have 5 listbox controls which I populated from the database tables. I tried it using the wizard. For all 5 listboxes and a single Repeater I used a SQL DataSourse Object and mapped this...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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...

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.