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

how to change the a few styles of all comobo boxes with Skin = webblue without adding a new skin.

1 Answer 52 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Kieran
Top achievements
Rank 1
Kieran asked on 15 May 2010, 01:35 PM
Hi

I want to change the a few styles of all comobo boxes with Skin = webblue without adding a new skin.

I have tried the following which I had thought would work but to no avail

div.RadComboBox_WebBlue .rcbDisabled
{
     color : black
}

Basically want to just change the color of the text disabled combo boxes - also to make the lower edge of the text visible (in webblue there is now lower edge)

Regards
K

1 Answer, 1 is accepted

Sort by
0
Kamen Bundev
Telerik team
answered on 17 May 2010, 08:22 AM
Hello Kieran,

Unfortunately the color of a disabled input in IE can't be controlled - the OS decides what it will be. So regardless of your settings, the text in a disabled RadComboBox in IE will remain the same. One way to overcome this is to fake a disabled input instead of using one. Try adding this CSS in the head tag:
.RadComboBox
{
    position: relative;
}
.RadComboBox .rcbDisabledOverlay
{
    position: absolute;
    z-index: 1;
    width: 100%;
    height: 100%;
    top: 0;
    filter: alpha(opacity=0);
    opacity: 0;
    -moz-opacity: 0;
}

and this javascript right after your ScriptManager and see if it helps:
Telerik.Web.UI.RadComboBox.prototype.enable = function() {
    $telerik.$(this.get_element()).children('.rcbDisabledOverlay').remove();

    this.get_inputDomElement().disabled = false;
    var table = this.get_tableElement();
    if (table != null)
        table.className = "";

    this.set_enabled(true);
    this.enableEvents()

    var itemCount = this.get_items().get_count();

    for (var i = 0; i < itemCount; i++)
        this._children.getItem(i).enable();
};
    
Telerik.Web.UI.RadComboBox.prototype.disable = function() {
    $telerik.$(this.get_element()).append('<iframe src="" class="rcbDisabledOverlay">&nbsp;</iframe>');

    var table = this.get_tableElement();
    if (table != null)
        table.className = "rcbDisabled";

    this.set_enabled(false);
    this.disableEvents();

    var itemsCount = this.get_items().get_count();

    for (var i = 0; i < itemsCount; i++)
        this._children.getItem(i).disable();
}

Unfortunately this means that you have to disable your RadComboBoxes in client-side. Also be aware of the position: relative bug in IE6/7 that may cause your RadComboBoxes to stay fixed when you scroll - you can easily fix that by adding position: relative to all your scrolling containers.

Regards,
Kamen Bundev
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
ComboBox
Asked by
Kieran
Top achievements
Rank 1
Answers by
Kamen Bundev
Telerik team
Share this question
or