Solved

Nested Repeaters with C#

Posted on 2004-08-05
2
198 Views
Last Modified: 2008-03-17
I have an object that looks like this :

int frequency
string term
string eventtitle
string presenter
string phone
string email
DateTime begintime
DateTime endtime
.....etc.....

Now on my display page I have an array of these objects named events.

I would like the page to display as follows:

Monthly (frequency = 2)
-----------------------------------------------------
           Fall (term)
           ~~~~~~~~~~~~~~~~~~~~~~~~~
             Event 1 (eventtitle)      Joe Smith (presenter)     ...etc.....
             Event 3 (eventtitle)      John Jacobs(presenter)     ...etc.....
             Event 4 (eventtitle)      Mary Black (presenter)     ...etc.....

           Winter (term)
           ~~~~~~~~~~~~~~~~~~~~~~~~~
             Event 2 (eventtitle)      Bob Brown (presenter)     ...etc.....
             Event 6 (eventtitle)      Suzy Sanchez(presenter)     ...etc.....

Weekly (frequency = 1)
-----------------------------------------------------
           Summer(term)
           ~~~~~~~~~~~~~~~~~~~~~~~~~
             Event 10 (eventtitle)      George Jefferson (presenter)     ...etc.....

           Winter (term)
           ~~~~~~~~~~~~~~~~~~~~~~~~~
             Event 21 (eventtitle)     Jim Ploney (presenter)     ...etc.....
             Event 67 (eventtitle)     Henry Howards (presenter)     ...etc.....


So basically grouped first on frequency,
then within frequency grouped on term,
then within term ordered by event title


I can change the array of objects to a collection or some other structure, but cannot access the database tables directly (using a N-tier structure for our project) becaues we are isolating the presentation layer from the data and business layers.

How do I go about binding this data to a repeater or datalist in order to have the heirarchical display mentioned above.

Thanks!!

 
0
Comment
Question by:mrichmon
2 Comments
 
LVL 35

Author Comment

by:mrichmon
ID: 11887521
OKay apparently no one here knows the answer...

I came up with a work around which is to write a function in the presentation layer that manually calculates whether it is a new group or not.

A very clumsy/clunky work-around, but it works
0
 

Accepted Solution

by:
CetusMOD earned 0 total points
ID: 11890170
Closed, 500 points refunded.
CetusMOD
Community Support Moderator
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall‚Ķ
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question