PDA

View Full Version : DataView template



simon
18 Jul 2009, 12:54 PM
I would like to include ext.component in dataView template. For example, I have list of uploaded documents in store and I would like to render this list as link buttons to open the document and beside each link i would like to have button, which will delete this link on click and call the store update and server delete method.


var tpl = new Ext.XTemplate(
'<tpl for=".">',
'<div><a href="{url}">"{name}"</a>'</div>',
'<div>here I would like to have button(probably ext control)which on click delete',
'this link from the client and also call server method to delete it from the server</div>'
'</tpl>',
'<div class="x-clear"></div>'
);

Any example or idea how to do that?

Thank you,
Simon