查看文档为
setValue( Object value ) : Ext.form.CheckboxGroup
Sets the value of the radio group. The radio with corresponding name and value will be set. This method is simpler than Ext.form.CheckboxGroup.setValue because only 1 value is allowed for each
name.
Parameters
value : Object
The map from names to values to be set.
Returns
Ext.form.CheckboxGroup
this
对于我定义的CheckboxGroup
var rd_calc = new Ext.form.RadioGroup({
fieldLabel: '计算安全分',
width: 200,
items: [
{ name: 'into_calculation', inputValue: 'on', boxLabel: '是', checked: true },
{ name: 'into_calculation', inputValue: 'off', boxLabel: '否'}
]
});
回填的时候使用:
rd_calc.setValue({into_calculation:‘off’});//选择否,同理on为选择是。
红色部分为API中的Object