/!\ How to colorize selected checkbox in checkboxlist control ?

Discussion in 'ASP .Net' started by Francois Verbeeck, Jun 24, 2003.

  1. Dear UseNet readers,

    Does anyone have any idea on how to colorize selected checkbox in
    checkboxlist control ?

    I've quite a huge checkboxlist (approximatively one full screen) and,
    to improve user's experience, i wanted to highlight selected choices.
    Does anyone know how to that ?

    I can successfully do that on a datagrid by adding some code during
    the ItemDatabound process

    ....
    e.Item.Attributes.Add("onmouseover","this.style.backgroundColor='WhiteSmoke'");
    ....

    but there is no "ItemDataBound function on the checkboxlist :( I tried
    to do it on the SelectedIndexChanged but without success (i can't cast
    a ListItem to a checkbox list so i'm not able to set a BackColor
    property :(

    Anyone knows a css trick to do that ? the right javascript code to add
    at the right time ? I've been learning asp.net since only 2 months and
    i feel sorry to ask such basic / pointless questions

    Maybe i'll have to create a small datagrid with a hidden datavalue
    column, a checkbox column and a datatextfield label column to cheat
    this ...

    Hope anyone can help.

    Best Regards.
    Francois Verbeeck, Jun 24, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. MattC
    Replies:
    0
    Views:
    1,568
    MattC
    Mar 22, 2005
  2. Patrick.O.Ige
    Replies:
    5
    Views:
    19,062
    Patrick.O.Ige
    Jun 19, 2005
  3. Christian Perthen

    Colorize vbscript syntax?

    Christian Perthen, Mar 15, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    401
    Christian Perthen
    Mar 15, 2006
  4. qwweeeit

    Colorize expanded tabs

    qwweeeit, Dec 4, 2005, in forum: Python
    Replies:
    2
    Views:
    373
    qwweeeit
    Dec 4, 2005
  5. asp123 vbnet via .NET 247

    Adding Checkboxlist/checkbox to dataGrid and retrieving selected value

    asp123 vbnet via .NET 247, Mar 25, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    603
    asp123 vbnet via .NET 247
    Mar 25, 2005
Loading...

Share This Page