Saya memiliki kolom sel XTemplate di Panel Grid. Bagaimana cara menambahkan acara klik/pendengar yang berlaku untuk semua sel di kolom khusus ini? Apa yang saya coba sejauh ini berhasil tetapi berlaku untuk SEMUA klik pada sel APAPUN di kisi. Sepertinya saya tidak bisa memanipulasi opsi delegasi untuk memfilter kelas elemen tertentu.
Kode saya sejauh ini:
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']);
}