469,575 Members | 1,662 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,575 developers. It's quick & easy.

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 2495
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Donald Williamson | last post: by
2 posts views Thread by Paul K | last post: by
1 post views Thread by .Net Sports | last post: by
7 posts views Thread by charliewest | last post: by
3 posts views Thread by Alex Maghen | last post: by
4 posts views Thread by Brad Baker | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.