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

Change the background color of the "Check All Items" option on ComboBox

2 Answers 45 Views
UI for ASP.NET AJAX in ASP.NET MVC
This is a migrated thread and some comments may be shown as answers.
Tyler
Top achievements
Rank 1
Tyler asked on 18 Sep 2013, 09:21 PM
I think I posted this in the wrong area the first time. Here it is again...

I've seen some similar threads to this question, but nothing that specifically addresses it. I have a RadComboBox that I add various items, too. I needed the ability to select "ALL" items, so I put in the EnableCheckAllItemsCheckBox property. Now, all of the items that I add have a white background, bu tthe all items checked button has a dark gray background that the UI people don't like. I've figured out some other issues with this, but the one thing remaining is...
 
How do I change the background color of the All items checked option? I've tried style sheets and some other things, but nothing works so far. This is what I use, along with some javacript to click it on default
 
<telerik:RadComboBox  runat="server" ID="cboInvoiceStatus" CheckBoxes="True" AutoPostBack="true" HighlightTemplatedItems="true" IncludeSelectOption="false" EnableCheckAllItemsCheckBox="true" AllowCustomText="true" Localization-CheckAllString="Select All" >
 </telerik:RadComboBox >
 
Any help is appreciated. Thanks,

2 Answers, 1 is accepted

Sort by
0
Nencho
Telerik team
answered on 23 Sep 2013, 07:15 AM
Hello Tyler,

I would suggest you to use the rcbCheckAllItems which is the responsible css class for the CheckAll option. In addition, you could use the !important  in order to overwrite the defaut styling of the checkbox. Please consider the following approach:
<style type="text/css">
       .rcbCheckAllItems {
            background-color : white !important ;
        }
    </style>

In addition, here is a video, demonstrating the behavior when the above suggestion is implemented.

Regards,
Nencho
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Tyler
Top achievements
Rank 1
answered on 23 Sep 2013, 04:02 PM
It turns out that our derived class was already doing that, but the person who first wrote it accidentally did a copy and paste error and cause the odd background color to appear, AND to be the same as the background text.

A simple change from
background-color: #767676;
to
background-color: #ffffff;

solved everything. I'm old school, and prefer the hex codes to color names. But, all is well in the end.

Thanks for the assistance!
Tags
UI for ASP.NET AJAX in ASP.NET MVC
Asked by
Tyler
Top achievements
Rank 1
Answers by
Nencho
Telerik team
Tyler
Top achievements
Rank 1
Share this question
or