
I want to have a field that displays data, but is not always editable, and isn't the hard to read gray-on-gray of the disabled state. I generally suppress the dropdown and then use a light gray back ground with black text, but I don't see anyway to suppress the dropdown.
Is there a way to achieve what I'm looking for?
Josh
9 Answers, 1 is accepted
Hi Joshua Ruppert,
Thank you for writing.
As far as I understand, you would like a different appearance from the default RadComboBox when the control is disabled (the Enabled property is set to false). Since in this state an image is drawn onto the control itself, you cannot change it.
However, thanks to the element hierarchy of our controls and the theming mechanism, you can change this behavior. You should implement your custom theme with added states to the necessary elements with condition when RadElement.Enabled property is set to false. Then all you have to do is to apply the theme and set the UseDefaultDisabledPaint property to false as shown below:
RadComboBox.ComboBoxElement.UseDefaultDisabledPaint = false;
If you need any further assistance, please write us again.
Sincerely yours,
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center

Josh

You can change this property in the Properties window from the Design View of your Form.
I hope this helps.
Michael

I just wanted to make sure that you have achieved the control behavior you were looking for using the solution we provided in our last post.
Please let us know if we can help you any further.
Regards,
Kiril
the Telerik team
Instantly find answers to your questions at the new Telerik Support Center

I am trying to implement the same behaviour. Is it possible to manipulate the combobox to a readonly control. For example, the view only mode would show 'Canada'. When the user selects the update link on the page the text (Canada) will change to a combobox where the user can update the country.
I don't want to put two controls on the page but manipulate the combobox in displaying the full behaviour to just displaying the selected text in different modes.
Thanks,
Feizal
In this case the solution is to set the property, DropDownStyle to DropDownList. This will prevent you from typing in the control's TextBox part. In addition, you should subscribe and cancel the event DropDownOpening:
void
radDropDownList1_PopupOpening(
object
sender, CancelEventArgs e)
{
if
(
this
.radDropDownList1.DropDownStyle==DropDownList)
{
e.Cancel =
true
;
}
}
I hope this helps.
Best wishes,
Peter
the Telerik team

Is there a way to implement the behaviour using the combobox?
Thanks,
Feizal
Thanks for writing back.
I am not sure why you can't find the DropDownStyle property at RadComboBox. The following code snippet should work on your side:
RadComboBox radComboBox1 =
new
RadComboBox();
radComboBox1.DropDownStyle = Telerik.WinControls.RadDropDownStyle.DropDownList;
Please refer to this article for additional information.
Generally, I would recommend updating to RadDropDownList. RadComboBox is an obsolete control and it will be removed in one of our next version. Please find additional information about RadDropdownList here.
I hope this will help.
Peter
the Telerik team