www.webdeveloper.com
Results 1 to 2 of 2

Thread: Change layout of rows in DataList in accordance with data

  1. #1
    Join Date
    May 2004
    Location
    Russia
    Posts
    13

    Change layout of rows in DataList in accordance with data

    Folks,

    I have following situation:
    I want to make table, rows of which would contain different appearence in accordance with data they were fed. For instance, when I have plain data there should be 1 textbox and when I have href then there should be 2 textboxes (for URL and COver respectively).
    Currently I try to do it using DataList. But it goes not so good. And from this point of view I do not see any difference between DataList, DataGrid and Repeater. The only way to solve it I see by now is to manage property visible of some elements.
    But I'm curious if there are any better solutions.

    Thank you in advice.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    We'll never stop livin' this way
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  2. #2
    Join Date
    Nov 2002
    Location
    Auburn, AL
    Posts
    9,224
    repeater would give you the most control. You can have raw html inside of the temp and then put in the data for the css attributes and style it. You could also, if you wanted 100% control of everything, us a <% loop here %> loop within the code and have it loop through the data set printing the records with data and style it as you go that way, but this is kind of a pain in the butt, it is how data bound stuff was done with asp classic.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles