1 Attachment(s)
Regarding tpl button eventhndler
Hi,
i am shivanad tripathi new in extjs i have one template which have to button edit and delete and i am using html code for creating button but i want that button on controller so how to get that button on controller based on button id .
i am sending my screen shot and code also.
tpl : new Ext.XTemplate(
'<tpl for=".">',
'<div class="thumb-wrap">',
'<div class="thumb">',
(!Ext.isIE6
? '<img src="http://192.168.1.229/mailtrack-svc/service/image-service/getImageData/template/{name}" height="90" width="90" />'
: '<div style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\'http://localhost/mailtrack-svc/service/image-service/getImageData/template/{name}\')"></div>'),
'</div>', '<span><input type=button value=Edit onclick="Editbutton" id="Editbutton">       </span>', '<span><input type=button value=Delete>  </span>', '</div>', '</tpl>'),
handler: function(values) {
var id = Ext.id();
alert("idclcik"+id);
Ext.Function.defer(this.addListener, 1, this, [id])
return id;
},
listener: function() {
Ext.getCmp('Editbutton').on('click',function(){
alert("editclcik");
});
}
Thanks&Regards,
Shivanand
});
var categoriesList = Ext.create('lib.Commons.Components.Containers.MailTrackFieldSet',{
border:false,
items : [
Categories
],
});