[英]Changing checkboxes to a radio button group ExtJS
I am brand new to Ext JS
. 我是
Ext JS
新手。 I have this group of checkboxes that work fine but I need to change them to Radio
buttons and retain their functionality. 我有这组复选框工作正常但我需要将它们更改为
Radio
按钮并保留其功能。 If you could help me out I would appreciate it. 如果你能帮助我,我会很感激。 Again I am brand new to EXT JS.
我再次成为EXT JS的新手。 I made them
field.Radio
but still allows all of them to be selected. 我把它们
field.Radio
但仍然可以选择所有这些。 Please help: 请帮忙:
var employeeBox = Ext.create('Ext.form.field.Radio', {
id:'employeeBox',
fieldLabel: 'Employee Group:',
labelAlign:'left'
});
var mpBox = Ext.create('Ext.form.field.Radio', {
id:'mpBox',
fieldLabel: 'Market Particpants Group:',
labelAlign:'left'
});
var committeeBox = Ext.create('Ext.form.field.Radio', {
id:'committeeBox',
fieldLabel: 'Committee Group:',
labelAlign:'left'
});
You need to add the same name to all of them. 您需要为所有这些添加相同的名称。 For example:
例如:
var employeeBox = Ext.create('Ext.form.field.Radio', {
id:'employeeBox',
name: 'group',
fieldLabel: 'Employee Group:',
labelAlign:'left'
});
var mpBox = Ext.create('Ext.form.field.Radio', {
id:'mpBox',
name: 'group',
fieldLabel: 'Market Particpants Group:',
labelAlign:'left'
});
var committeeBox = Ext.create('Ext.form.field.Radio', {
id:'committeeBox',
name: 'group',
fieldLabel: 'Committee Group:',
labelAlign:'left'
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.