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

RadComboBox - Background color change

2 Answers 1253 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
venm
Top achievements
Rank 1
venm asked on 13 Aug 2009, 03:10 PM
Hi,

I am using "RadComboBox" with couple of client side events which helped me in achieving the goal of cascading dropdowns. [when I select the first combobox item my second combobox will be loaded & after selecting the second comboboxItem thried combobox will be loaded etc.]

I followed the example at "http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/multiplecomboboxes/defaultcs.aspx"

Currently I need to show different background color/ different font color when I am showing "Loading...." message on each dropdown. 
Since I am setting this "Loading..." message in the client side javascript as  "Combo.set_text("Loading...")"
Can anyone help me how to change its color....

Thanks
Venm

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 14 Aug 2009, 06:52 AM
Hi Venm,

Checkout the following example which shows how to change the color of the RadComboBox input background color and text color from client side. Hope this will help you in getting strated.

ASPX:
 
<telerik:RadComboBox ID="RadComboBox1" runat="server">     
    <Items>    
        <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem1" Value="RadComboBoxItem1">     
        </telerik:RadComboBoxItem>    
        <telerik:RadComboBoxItem runat="server" Text="RadComboBoxItem2" Value="RadComboBoxItem2">     
        </telerik:RadComboBoxItem>    
    </Items>    
</telerik:RadComboBox>    
<input id="Button1" type="button" value="button" onclick="ChangeColor();" /> 

JavScript:
 
<script type="text/javascript">  
function ChangeColor(sender, eventArgs)  
{  
   var combo = $find("<%= RadComboBox1.ClientID %>");      
   combo.set_text("Loading...");  
   var inputElement = combo.get_inputDomElement();  
   inputElement.style.backgroundColor = "red";               
   inputElement.style.color = "blue";  
}  
</script> 
Also go through the folowing link to know more about changing the appearance of the input element of RadComboBox.
Tutorial: Change the appearance of the Input element

Thanks,
Princy.
0
venm
Top achievements
Rank 1
answered on 16 Aug 2009, 09:40 PM
Hi Princy

Thanks for your help.

Venm
Tags
ComboBox
Asked by
venm
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
venm
Top achievements
Rank 1
Share this question
or