Nested Repeaters


       I want to show a series of images in two dimensions. For that I want to use nested Repeaters, but with the SAME DATASOURCE. Also I want to show 4 images in a row and then it should wrap up to the second row and after 5 such rows, on to the next page.

       I Googled about this. I came across some example of nested repeaters but they had Different Datasources for both repeaters. They were bound with a primary key from one table as foreign key in another table. But I want SAME DATASOURCE in both repeaters...The page will look like something below with images in empty squares.

                |         |      |
                |        |       |
                |        |       |
                |        |       |
      Is there a way of doing this? Has anybody dome something like this or know some pointer where I can look?

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

are you going to be getting this info from a database?  If so I think the easiest way would be to use a datalist control instead.  With the datalist you can easily set the number of columns to repeat before going to the next row.  You can create the paging functionallity pretty easily with SQL.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
payal1711Author Commented:

   Yes, I will be getting data from the database. How can I create the paging functionality with SQL, can you give an example?
sure what you would do is the following Select top YourPageSize * from yourtable where data = this and yourtablesprimarykey no in (Select top RowstoSkip yourtablesprimarykey  from yourtable)

so say you had a table that looked like this
TableName: images
id  --- autonumber
imglink --- varchar
group -- varchar

and you only want to show 20 pictures per page you would write the SQL like this

this would be page 1
Select top 20 * from images where group='students' and id not in (Select top 0 id from images)

this would be page 2
Select top 20 * from images where group='students' and id not in (Select top 20 id from images)

etc etc.  Hope you understand that.
payal1711Author Commented:

  Of course I made it so easy...I also found a link you would like to see. It is about adding paging to DataList Control. I dont know if it works, but if it doesnt, I can always use the sql method you just specified..

     Thanks a lot for your prompt help.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.