ext 中 設置 radioGroup 內 radio的值

{fieldLabel:"是否可用",labelWidth:60,xtype:'radiogroup',itemId:'isUsed',width:180,items:[
                                { boxLabel: '否', name: 'isUsed', inputValue:false},
                                { boxLabel: '是', name: 'isUsed', inputValue:true,checked:true}
 ]}


tar.down('#isUsed').setValue({'isUsed':data.isUsed});


不能直接 tar.down('#isUsed').setValue({data.isUsed});

要以json map的形式 指明 name,因爲一個radioGroup內可以有多個radio分組。


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章