我想在控制器中定义一个ref以在选择更改时启用/禁用删除buitton。但我不明白,所以getDelButton() - 方法提供了未定义的。请帮助...ExtJs 4参考网格中的工具栏按钮
控制器:
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,
},
在此先感谢...
请接受答案,或者如果您没有得到您需要的内容,请添加评论。 – LittleTreeX