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

Complex data binding to repeater control question.

Hello.

I have an interesting data binding scenario:

I have a repeater control. It repeats a typical custom web user
control.

I also have a collection object, and each collection element contains
various pieces of information inside a custom object, including an id
field.

This bit's quite easy: bind the collection object to the repeater, and
get each repeated web user control to display various data fields that
the collection object's elements contain.

The challenge is: I have a second collection object, and both
collection objects conveniently share the same id field for cross
checking purposes. I need the repeated web user controls to display
various data fields from *both* collections, and not just from one
collection, but I can only bind one collection to the repeater
control.

Any thoughts at all would be gratefully received...apart from "good
luck!" <g>

TIA,
-dnw.
Nov 18 '05 #1
1 2694
I found a way to solve this problem.

Just take the id field from the first collection, and bind it to a
public property inside the web user control. Then, inside this web
user control's code behind class, you have access to this id field
(from the first collection), which you can then use to search for
objects inside the second collection, as the 2 collections are linked
together via the common id field.

-dnw.
do***@hotmail.com (Dot net work) wrote in message news:<77**************************@posting.google. com>...
Hello.

I have an interesting data binding scenario:

I have a repeater control. It repeats a typical custom web user
control.

I also have a collection object, and each collection element contains
various pieces of information inside a custom object, including an id
field.

This bit's quite easy: bind the collection object to the repeater, and
get each repeated web user control to display various data fields that
the collection object's elements contain.

The challenge is: I have a second collection object, and both
collection objects conveniently share the same id field for cross
checking purposes. I need the repeated web user controls to display
various data fields from *both* collections, and not just from one
collection, but I can only bind one collection to the repeater
control.

Any thoughts at all would be gratefully received...apart from "good
luck!" <g>

TIA,
-dnw.

Nov 18 '05 #2

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

Similar topics

2
by: Donald Williamson | last post by:
I have a DataReader that I am binding to a Repeater control. In the DataReader, I have two fields: 'Name1' and 'Name2' 'Name1' will always have a person's name. Name2 periodically has a person's...
2
by: Jordan | last post by:
I'm curious if the whole point of Repeaters/Data Lists/Grids is encapsulating additional functionality like add/update/edit/deletes, but really does not provide any benefits when it comes to simply...
2
by: Paul K | last post by:
I'm having a problem getting the data binding to work with the repeater control. Here's the code for the code-behind class private void Page_Load(object sender, System.EventArgs e if...
8
by: darrel | last post by:
*sigh*...I've asked this before, but have long forgotten the answer. In the past, I'd often use repeater controls, bind data to it, and then reference the data fields from within the repeater: ...
1
by: .Net Sports | last post by:
I am resurrecting an old script from a previous programmer, and want to migrate it over to asp.net from classic asp. Tho there are other peripheral parts of the script (that really have no bearing...
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...
9
by: Jaybuffet | last post by:
my aspx has something like this <asp:Repeater id="Repeater1" runat="server"> <ItemTemplate> <mycontrol:ctl id="ctlId" obj='<%# Container.DataItem %>' showItem="true"/> </ItemTemplate>...
3
by: Alex Maghen | last post by:
I'm having trouble with my repeater: I'm binding my Repeater control to an OleDbDataReader object. My ASPX looks like this: <asp:Repeater ID="Rptr" runat="server"> <ItemTemplate> <asp:Label...
4
by: Brad Baker | last post by:
I'm going a little crazy :) I'm trying to bind a repeater control to a dataset on page load using the following code: if (Request.QueryString != null) { string customerid = Request.QueryString;...
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: 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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...

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.