需求:对combobox下拉内容进行分组。
效果样式:
代码:
1 valueField:'paymethod_name', 2 textField:'paymethod_name', 3 data:[{ 4 "id":1, 5 “paymethod_name":"text1" 6 }, 7 { "id":2, 8 "paymethod_name":"text2" 9 }, 10 { "id":3, 11 "paymethod_name":"text3", 12 "selected":true 13 }], 14 editable:false, 15 panelHeight:"auto", 16 panelMaxHeight:200, 17 groupField:'id', 18 groupFormatter:function(group){ 19 console.info(group); 20 if(group==3){ 21 return "第三方支付"; 22 } 23 } 24 } 25 }