我希望您能在控制器中定义一个引用,以便在选择更改时启用/禁用删除按钮。但是我做得不对,因此getDelButton()方法会返回未定义。请帮忙……
控制器:
refs:[
{ ref: 'tabPanel', selector: 'viewport > tabPanel' },
{ ref: 'grid', selector: 'tabPanel > usermanagementgrid' },
{ ref: 'delButton', selector: 'grid > button #delete'}
],
...
this.getDelButton().setDisabled(false);
查看定义:
dockedItems: [{
xtype: 'toolbar',
items : [ {
xtype: 'button',
id: 'delete',
iconCls: 'drop-add',
text: 'Add',
tooltip: 'Press to add a new user.',
action: 'addUser',
scope: this,
},
提前感谢...