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

Changing the background color of ComboBox input area programmatically

1 Answer 282 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Jeremy
Top achievements
Rank 1
Jeremy asked on 17 Jun 2008, 06:36 AM
Is it possible to change the background color of the input area of the RadComboBox server side. The only solution I've seen is to actually create a skin and assign the skin on a postback. I have a procedure that changes the background color of all the required fields on each form. I need to be able to change the background color of the combobox server-side.

Thanks,

Jeremy

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 17 Jun 2008, 12:00 PM
Hi,

Try the following code snippet to set the BackColor of a Combobox.

ASPX:
 <telerik:RadComboBox ID="RadComboBox2" runat="server" OnPreRender="RadComboBox2_PreRender"  > 
        </telerik:RadComboBox> 

CS:
  protected void RadComboBox2_PreRender(object sender, EventArgs e)  
    {  
        RadComboBox2.BackColor = System.Drawing.Color.LightBlue;  
    } 


Thanks
Princy.
Tags
ComboBox
Asked by
Jeremy
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or