【发布时间】:2018-02-03 00:42:32
【问题描述】:
我想向我的 School 组件添加一个侦听器,该组件是网格内的一列。 School 的 editor 字段的 xtype 扩展了 Ext JS Picker。基本上,监听器将有一个函数在绑定教室值时将 bindBool 设置为 true。
网格:
xtype: 'grid',
scrollable: 'y',
maxHeight: 300,
margin: 10,
sortable: false,
plugins: [{
ptype: 'cellediting',
clicksToEdit: 1,
pluginId: 'gridEditor'
编辑器
{
header: 'School',
width: 300,
dataIndex: 'classroom',
renderer: function(value) {
return value.classroomString;
},
editor: {
xtype: 'classroomfield',
bind: {
value: '{classroom}'
}
}
}
祖鲁语按钮:
items: [{
xtype: 'panel',
buttons: [{
style: 'margin-right: 30px',
text: 'Zulu',
iconCls: 'x-fa fa-upload',
handler: 'xray',
bind: {
disabled: '{bindBool}'
}
}]
}]
【问题讨论】:
-
不清楚你在问什么。为什么你认为它应该有所不同?
-
当网格单元格中的数据从null更改时,我希望启用按钮。我不想实际编写代码来更新按钮中的值。
标签: javascript extjs