Image Gallery with DataGrid

Posted on 2007-10-12
Last Modified: 2008-01-09
Hi Experts!
I'm trying to create a little image gallery with the DataGrid. I would like to have 4 column DataGrid with multiple images on the page. I tried creating 4 Template Columns with image Eval("Name","Images/{0}") code expression but I end up with 4 same images per line.
What expression can I use or what can I do to make sure that images in the row do not repeat because right now my DataGrid looks like this:

imageA   |  imageA   |  imageA   |  imageA   |  
imageB   |  imageB   |  imageB   |  imageB   |  
imageC   |   imageC   |   imageC   |   imageC   |  
imageD   |   imageD   |   imageD   |   imageD   |  

and I need it to look:

imageA   |   imageB   |   imageC   |   imageD   |  
imageE   |   imageF    |   imageG  |   imageH    |  
imageI   |   imageJ     |   imageK   |   imageL    |  
imageM   |   imageN   |   imageO   |   imageP   |  

Hope it's clear enough.
Thank you in advance.
Question by:techsuppoprt
    LVL 37

    Expert Comment

    what about using a datalist? set the repeatcolumns to 4 ...
    LVL 1

    Author Comment

    DataList doen'st have a 'Paging' Ability  ( at least not that I know of ) and I'll neet to have pages.
    LVL 37

    Accepted Solution

    no, paging isn't built into the datalist like a gridview, but it can be done,
    from the master himself:

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Join & Write a Comment

    Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
    International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
    This video discusses moving either the default database or any database to a new volume.
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    729 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

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now