初始化checkboxgroup值

 1 Ext.override(Ext.form.CheckboxGroup,{
 2     
 3     setValueForItem : function(val){  //多个选项值以逗号分开的
 4         val = ","+val+","
 5          this.items.each(function(item) { 
 6             if (val.indexOf(item.inputValue) > -1) { 
 7                 item.setValue(true);
 8             } else {
 9                 item.setValue(false);
10             }
11         });
12     }
13     ,clearValueForItem:function(){  //
清空所有值
14          this.items.each(function(item) { 
15             item.setValue(false);
16         });
17     }
18 });
原文地址:https://www.cnblogs.com/yimu/p/LOVEMM.html