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

[Solved] How to Change BackgroundColor of Inputbox in RadComboBox Dynamically?

1 Answer 363 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Rob
Top achievements
Rank 1
Rob asked on 10 Jun 2009, 04:30 PM
Here's my situation.  I have a RadToolbar, a RadComboBox, & a RadGrid on a page.  When the page loads initially, the inputbox color in the combobox is white and there is no data in the grid.  If the user selects an item from the combobox, clicks a button on the toolbar, the grid gets populated with data and everything is fine.  If the user clicks the button on the toolbar before selecting an item from the combobox, the the backgroundcolor of the inputbox needs to turn pink. 

If handled on the server side, in the Grid_NeedDatasource event, I check the selected value of the combobox and try to set the backgroundcolor if nothing is selected.  Could use some help here.

If handled no the client side, the AJAX call would need to be canceled as well as setting the color.

I'm lost.  All help is appreciated.

Thanks,
Rob

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 11 Jun 2009, 05:53 AM
Hello Rob,

Try the following code in order to change the backcolor of RadComboBox at runtime.

CS:
 
RadComboBox1.BackColor = System.Drawing.Color.Pink; 
Checkout the following link for more information on this:
Tutorial: Change the appearance of the Input element

Thanks,
Shinu.
Tags
ComboBox
Asked by
Rob
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or