Results 1 to 3 of 3

Thread: change color of every other record in datalist

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Aug 2003
    Location
    Edinburgh, UK
    Posts
    2,773

    change color of every other record in datalist

    is it possible to change the apperance (font/color and so on) of every record that is retrieved from SQL when binding to a datalist in ASP.NET?

    if so - how?

    currently, it just looks pretty plain, i am going to have things like guestbooks/private messages/forum/news all using the same layout using datalist and would be nice to jazz it up

  2. #2
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359

    Re: change color of every other record in datalist

    Use a Repeater Control and change the ItemTemplate and AlternateItemTemplate HTML Templates
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  3. #3
    Frenzied Member dj4uk's Avatar
    Join Date
    Aug 2002
    Location
    Birmingham, UK Lobotomies: 3
    Posts
    1,131

    Re: change color of every other record in datalist

    ...or use the datalist ItemStyle and AlternatingItemStyle properties.

    DJ

Posting Permissions

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



Click Here to Expand Forum to Full Width