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

SelectedValue in Disabled ComboBox on Chrome

1 Answer 196 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 2
Iron
Iron
Iron
Michael asked on 12 Jan 2012, 04:58 PM
I have a web form that uses several RadComboBoxes - when the form is in "add" mode the comboboxes are enabled to allow user to specify information and the combo boxes all function properly in IE, Firefox, Chrome.  However, when in "edit" mode certain combo boxes are disabled since some of the information cannot be modified - I set the selected value server side based on the information saved when the record was added then I disable the Combo Boxex - in IE and Firefox the selected value shows fine but in Chrome the selected value is either transparent or not being shown - ref the attached files.  The code to bind the combo boxes and set selected value is in code behind and thus never changes so that generally rules that out as the issue.  Anyone else seen this and/or know how to resolve.

1 Answer, 1 is accepted

Sort by
0
Kalina
Telerik team
answered on 12 Jan 2012, 05:35 PM
Hello,

We are aware of this issue and have already started researching for a solution.

In general, the different browsers apply different default colour at the text of the disabled inputs - this is a browser behaviour.

There are two options that you can try:
- To override this RadComboBox css style:
<style type="text/css">
div.RadComboBox .rcbDisabled,
div.RadComboBox .rcbDisabled .rcbInputCell .rcbInput
{   
    color: #555555;
}
</style>

OR
- To change the colour by handling the RadComboBox ClientLoad event:
functionOnClientLoad(sender)
{
  if($telerik.isChrome)
    sender.get_inputDomElement().style.color = "#555555";
}

Please note the following limitations:
1. Under Internet Explorer the disabled input text colour simply cannot be changed - this is a browser limitation that we have tried to overcome in various ways but without success. Whatever text color you define - Internet Explorer will render a gray text at the disabled input.
2. Under Chrome or Firefox you can try customizing the text colour - but browser might change it by applying a filter.

All the best,
Kalina
the Telerik team
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 their blog feed now
Tags
ComboBox
Asked by
Michael
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Kalina
Telerik team
Share this question
or