By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,144 Members | 972 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,144 IT Pros & Developers. It's quick & easy.

Complex data binding to repeater control question.

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.