Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / October 2007

Tip: Looking for answers? Try searching our database.

Nested Repeaters Question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
andrew.douglas11@gmail.com - 30 Oct 2007 21:32 GMT
Hello all,

Is it possible to share controls inside a child repeater?  Here's the
situation: I have a web page that needs to display data grouped by A,
and alternatively by B (only one grouping displayed at a time through
Panel.Visible).  A and B both share common child data: C.  I have 2
parent repeaters corresponding to A and B, and each of those repeaters
have 1 child repeater containing child data C.  Presently, my code
handles databinding on these repeaters just fine.  However, there are
asp.net controls embedded inside the repeater items of the child
repeater (C).  I'd like to have the page set up so that when the user
switches between viewing A and B, the controls in the child repeaters
share the same values.  What's the best way to accomplish this?

The controls in the child repeater can be given the same "id"
attribute, but they still operate as separate controls.  Also, I tried
to simply do away with B and its child, and have logic in the
OnItemDataBind event of the parent repeater display the information
corresponding to the currently-active view.  The initial display
works, but when I re-bind the parent repeater, it of course destroys
the child repeater and its controls.

Any suggestions would be greatly appreciated!

Andy
andrew.douglas11@gmail.com - 31 Oct 2007 18:28 GMT
In case anyone encounters this issue, here's how I'm dealing with it:

When the user switches between the 2 views, I'm manually setting the
properties of the web controls of view B = properties of the web
controls of view A.  I wrote a nasty method that has a FOR loop with 3
nested FOR loops to accomplish the property transfer.  I was hoping
there would be an easier way (and I'm still not convinced that there
isn't), but this way works despite requiring some complicated code.
Cheers.

Andy

On Oct 30, 4:32 pm, andrew.dougla...@gmail.com wrote:
> Hello all,
>
[quoted text clipped - 21 lines]
>
> Andy

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.