一个radiogroup:
this.relationCheckBox = new Ext.form.RadioGroup({ fieldLabel: '关系', id: 'condition_relation', defaultType: 'checkbox', vertical: true, width: 200, columns: 3, items:[{ id: 'relation_g', boxLabel: '>', inputValue: '1', listeners: { check: function(field){ if(field.checked == true){ Ext.getCmp('relation_l').disable(); }else{ Ext.getCmp('relation_l').enable(); } } } } ,{ id: 'relation_e', boxLabel: '=', inputValue: '0' } ,{ id: 'relation_l', boxLabel: '<', inputValue: '2', listeners: { check: function(field){ if(field.checked == true){ Ext.getCmp('relation_g').disable(); }else{ Ext.getCmp('relation_g').enable(); } } } }] });
?相对其中的checkbox进行动态设置,使其选中
但是 通过 遍历如
maker.relationCheckBox.items.each(function(item){ item.checked = true; });
没起作用,只有使用setValue,才可以
?
maker.relationCheckBox.items.each(function(item){//设置关系多选 item.setValue(true); });?这样checkbox就会被选中