격자 패널에 XTemplate 셀의 열이 있습니다. 이 특정 열의 모든 셀에 적용되는 클릭 이벤트/수신기를 어떻게 추가합니까? 지금까지 시도한 것은 작동하지만 그리드의 모든 셀에 대한 모든 클릭에 적용됩니다. 특정 클래스의 요소를 필터링하기 위해 대리자 옵션을 조작 할 수없는 것 같습니다. 지금까지격자의 XTemplate 요소 클래스에 이벤트 수신기 추가
내 코드 :
columns:[
...
{
xtype: 'templatecolumn',
text: 'Approve2',
flex: 1,
dataIndex: 'Approved',
align: 'center',
sortable: false,
tpl: '<input type="checkbox" class="approveCheckbox" />'
},
...
],
initComponent: function() {
this.on('itemclick', this.storeCheckboxVal, this, { delegate: '.approveCheckbox' });
},
...
,
storeCheckboxVal: function (view, record, item, index, event) {
alert(record.data['ID']);
}