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

How to change disable style of the TextBox of RadDropDownList

4 Answers 465 Views
DropDownList
This is a migrated thread and some comments may be shown as answers.
Ke
Top achievements
Rank 1
Ke asked on 04 Mar 2016, 03:34 PM

I need to change the background color of many Rad controls when they are disabled, RadDropDownList is one of them. I have searched up the forum but have not found a satisfactory answer. I am wondering if there is a built-in property that I can just set, so that each time RadDropDownList is disabled, its background color changes to black or gray, instead of the default disable-color. 

I understand that there is a built-in property to set default disable paint to false, it is shown in the code below. But then, how can I set up a custom disable paint? 

UseDefaultDisabledPaint = false;  

4 Answers, 1 is accepted

Sort by
0
Ke
Top achievements
Rank 1
answered on 04 Mar 2016, 06:50 PM
Never mind, figured out the answer. 
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 08 Mar 2016, 08:56 AM
Hello ,

Thank you for writing.

I am glad that the problem you were facing is now resolved. Note that the RadDropDownList.DropDownStyle property determines if the text area at the top of the control can be edited or not. Hence, it controls whether a TextBox will be displayed or not. Then you can customize the back color.

Should you have further questions I would be glad to help.
 
Regards,
Dess
Telerik
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 Feedback Portal and vote to affect the priority of the items
0
Ke
Top achievements
Rank 1
answered on 15 Mar 2016, 05:08 PM
Hi Dess, I have a form that contains raddropdownlist and radmaskedtextbox. I realized that the color of the text inside the radropdownlist's textbox is different than the text color in the radmaskedtextbox, even though I set them to be the same. May I know why this is happening? How do I set the text color so that all the text in different controls are the same? 
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 17 Mar 2016, 02:07 PM
Hello ,

Thank you for writing back. 

If the DropDownStyle property is set to RadDropDownStyle.DropDown the ForeColor is exactly the same as both controls (RadDropDownList and RadMaskedEditBox) host the MS TextBox. Please refer to the attached screenshot. As to the RadDropDownStyle.DropDownList setting, it is necessary to set the DropDownListElement.EditableElement.UseCompatibleTextRendering property to false.

I hope this information helps. If you have any additional questions, please let me know.

 Regards,
Dess
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Tags
DropDownList
Asked by
Ke
Top achievements
Rank 1
Answers by
Ke
Top achievements
Rank 1
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or