EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: Coder on September 03, 2017, 04:52:20 PM



Title: [SOLVED] Different Style for dropdown values of Grouped combobox
Post by: Coder on September 03, 2017, 04:52:20 PM
in one page I have two combobox:

Code:

  A: <input id="dgFilterA" class="easyui-combobox" style="width:200px" data-options="editable:false, onChange:dgFilterOnChange, url:'//ajx.$DOMAIN/?vg&s=sv&auth=$AJX_AUTH', method:'get', valueField:'ID', textField:'Name', groupField:'Owned', formatter: fmtComboFilterA, panelHeight:'auto', multiple:true, cls:'fltA'">

  B: <input id="dgFilterB" class="easyui-combobox" style="width:230px" data-options="editable:false, onChange:dgFilterOnChange, url:'//ajx.$DOMAIN/?vg&s=sl&auth=$AJX_AUTH', method:'get', valueField:'ID', textField:'Name', groupField:'Group', formatter: fmtComboFilterB, panelHeight:'auto', multiple:true, cls:'fltB'">


for filter B I dont need Name of group, so I`m in my css file do:
Code:
.combobox-group {
    /* display: none; */
    border-top: 1px solid silver;
    font-size: 0;
    padding: 0;
}

but this code hide GroupCaption and for FilterA :(

cls property is set value of class only to
  <span class="textbox combo" ...
and  not to
  <div class="panel combo-p panel-htop" .....

How I do it?


Title: Re: Different Style for dropdown values of Grouped combobox
Post by: stworthy on September 04, 2017, 03:30:07 PM
You should add the class to the drop-down panel.
Code:
$('#dgFilterA').combobox('panel').addClass('fltA');
$('#dgFilterB').combobox('panel').addClass('fltB');