Hello there,
I have a radCombobox that holds phone types. (business, cell, home etc) When someone selects a type, it loads that phone number in a text box. However, some types are blank, and some types hold a value. I want to modify the css style of just the items that actually hold a value.
I have my combo box loading from a custom CSS sheet succesfully.
When I modify these two classes in the CSS file, the changes are reflected in the drop down correctly. However, I need to be able to change the styles from code behind.
I want to change the style when the item has value to something like this:
Here is where I tried to change the item in code behind but and was unsuccessful:
any help is appreciated.
Coty
I have a radCombobox that holds phone types. (business, cell, home etc) When someone selects a type, it loads that phone number in a text box. However, some types are blank, and some types hold a value. I want to modify the css style of just the items that actually hold a value.
I have my combo box loading from a custom CSS sheet succesfully.
When I modify these two classes in the CSS file, the changes are reflected in the drop down correctly. However, I need to be able to change the styles from code behind.
| .RadComboBoxDropDown_Outlook .rcbItem, |
| .RadComboBoxDropDown_Outlook .rcbHovered, |
| .RadComboBoxDropDown_Outlook .rcbDisabled, |
| .RadComboBoxDropDown_Outlook .rcbLoading |
| { |
| padding:1px 20px 1px 4px; |
| } |
| .RadComboBoxDropDown_Outlook .rcbHovered |
| { |
| background:#306ac5; |
| color:#fff; |
| } |
| .RadComboBoxDropDown_Outlook2 .rcbItem, |
| .RadComboBoxDropDown_Outlook2 .rcbHovered, |
| .RadComboBoxDropDown_Outlook2 .rcbDisabled, |
| .RadComboBoxDropDown_Outlook2 .rcbLoading |
| { |
| padding:1px 4px 1px 20px; |
| color: Red; |
| } |
| .RadComboBoxDropDown_Outlook2 .rcbHovered |
| { |
| background:red; |
| color:#fff; |
| } |
Here is where I tried to change the item in code behind but and was unsuccessful:
| Dim typeArray() As Integer = .GetAllPhoneTypesAvailable() |
| For k As Integer = 0 To typeArray.Length - 1 |
| rcbPhones.FindItemByValue(typeArray(k)).CssClass = "RadComboBoxDropDown_Outlook2" |
| Next |
any help is appreciated.
Coty