我有两组按钮(在Extjs 4.1中),一次只能选中一个。问题是,我希望在开始时(当网格加载时)检查其中一个。代码如下:
{
xtype : 'checkboxgroup',
store : checked,
columns : 3,
vertical : false,
singleSelect: true,
items : [
{
xtype: 'button',
text: 'name',
width: 75,
toggleGroup: 'mygroup',
enableToggle: true,
listeners: {
click: function(th) {
//this == the button, as we are in the local scope
checked = [1,0,0];
}}
}, {
xtype: 'button',
text: 'buyer_member_id',
width:100,
toggleGroup: 'mygroup',
enableToggle: true,
listeners: {
click: function(th) {
//this == the button, as we are in the local scope
checked = [0,1,0];
}}
}, {
xtype: 'button',
text: 'id',
width: 50,
toggleGroup: 'mygroup',
enableToggle: true,
listeners: {
click: function(th) {
//this == the button, as we are in the local scope
checked = [0,0,1];
}}
}
]}我找到了一些帮助in the Sencha forum,但是我不能解决这个问题。
发布于 2013-10-02 17:56:51
这就是这个词:
pressed: true,插入到按钮配置说明中。
https://stackoverflow.com/questions/19134057
复制相似问题