This is a migrated thread and some comments may be shown as answers.

How to change selected item backcolor

3 Answers 178 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
Ed Staffin
Top achievements
Rank 1
Ed Staffin asked on 13 Aug 2010, 12:24 PM
Hi,
I am using a RadListbox and I have set the skin to windows 7. However, I would also like to separtely set the backcolor of the selected item to a particular color. How can I do this?
Thanks ... Ed

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 13 Aug 2010, 01:39 PM
Hello,


Add the folowing style on page and see whether it helps.

Style:
.RadListBox_Windows7 .rlbSelected
     {
         background-color: Green !important;
     }


Thanks,
Princy.
0
Ed Staffin
Top achievements
Rank 1
answered on 13 Aug 2010, 01:50 PM
Hi,
Thanks for the response. However, it doesn't seem to do anything. I added the snippet you suggested to the head section, but the selected item in the listbox still is the windows 7 blue. Do I need to change the tag somehow?
Thanks ... Ed
0
Genady Sergeev
Telerik team
answered on 19 Aug 2010, 04:55 PM
Hi Ed Staffin,

You can use the BackColor property provided by the RadListBoxItem class.

Regards,
Genady Sergeev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
ListBox
Asked by
Ed Staffin
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Ed Staffin
Top achievements
Rank 1
Genady Sergeev
Telerik team
Share this question
or