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

Highlighting contents in select box

1 Answer 41 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Savyo
Top achievements
Rank 1
Savyo asked on 30 Apr 2012, 10:47 AM
Hi there,

I have a problem regarding the select box i'm using in my application. I want to select multiple items in the box. However I want to customize it further by highlighting the selected items in a color of my choice. Please help me out.
Thanks in advance
SAVYO

1 Answer, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 30 Apr 2012, 11:51 AM
Hello Savyo,

Try the following javascript in of the RadComboBox.
JS:
<script type="text/javascript">
function OnClientItemChecked(sender, args)
{
 for (var i = 0; i < sender.get_checkedItems().length; i++)
 {
    var item = sender.get_checkedItems()[i];
    item.get_element().style.color = "Red";
 }
}
</script>

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