PDA

View Full Version : Adding Css class to selected item on ComboBox



mayoita
28 Sep 2012, 4:43 AM
There is any simple way to add a CSS class only to selected item on ComboBox?
Listconfig method with selectedItemsCls is ignored.

sword-it
28 Sep 2012, 5:51 AM
Hi mayoita,

You can override the default CSS class for selected item's of combobox like-


.x-boundlist-selected{
color:red;
}


See working example here - http://jsfiddle.net/maneeshgo/7eruN/

mayoita
28 Sep 2012, 6:53 AM
Hi mayoita,

You can override the default CSS class for selected item's of combobox like-


.x-boundlist-selected{
color:red;
}


See working example here - http://jsfiddle.net/maneeshgo/7eruN/

Sorry Sword,
I had to be more precise. In that way the Class is apply to all ComboBox item but I need to add a new CSS Class only to a specific ComboBox. I don't want to override the exiting one but add a new one.

mayoita
28 Sep 2012, 6:54 AM
Sorry Sword,
I had to be more precise. In that way the Class is apply to all ComboBox item but I need to add a new CSS Class only to a specific ComboBox. I don't want to override the exiting one but add a new one.