radiogroup的使用(EXTJS4)

 1 {layout:'column',border:false,anchor:'-20',items:[                
 2                     {columnWidth:.5,layout:'form',border:false,items:[{
 3                         xtype: 'radiogroup',
 4                         itemId: 'isRemindGroup',
 5                         fieldLabel: '是否提醒<span style="color:red">*</span>',
 6                         items: [{
 7                                 xtype: 'radio',
 8                                 boxLabel: '不提醒',
 9                                 inputValue:false,
10                                 name: "isRemind",
11                                 checked: true,
12                                 listeners: {
13                                     'change': Ext.bind(this.setRemindDateDisable, this)
14                                 }
15                             },{
16                                 xtype: 'radio',
17                                 boxLabel: '提醒',
18                                 inputValue: true,
19                                 name: "isRemind",
20                                 listeners: {
21                                     'change': Ext.bind(this.setRemindDateEnable, this)
22                                 }
23                         }]
24                     }]}
25                 ]},

赋值

 1 setRadio: function(isTrue, radioGroup) {        
 2         radioGroup.items.each(function(item){
 3             item.setValue(false);
 4         });
 5         if(isTrue) {
 6             radioGroup.items.each(function(item){
 7                 if(item.inputValue==true){
 8                     item.setValue(true);
 9                 }
10             });
11         } else {
12             radioGroup.items.each(function(item){
13                 if(item.inputValue==false){
14                     item.setValue(true);
15                 }
16             });
17         }
18     },

取值

1 var radioValue =  formPanel.down('radiogroup[itemId=publishAllGroup]').getValue().publishAll;

 

 

转载于:https://www.cnblogs.com/yuanhui69/p/3510616.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值