您的位置:首页 > Web前端 > JavaScript

EXTJS4中使用CheckboxGroup回填数据问题

2013-06-15 22:41 281 查看
查看文档为
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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: