PDA

View Full Version : How to capture the events for renderer data in GridPanel cell?



sureace
26 May 2011, 7:53 PM
Hi all,
I am having GridPanel with Recrods, For every record i renderred icons at the last cell for edit,delete and update. What i want is, how can i capture the click event for each icon. I tried by best to resolve this problem, but failed. Please give me a good solution to complete this.



var mygrid = new Ext.grid.GridPanel({
.........
{header:"Actions",renderer:function(value,metaData,record,rowIndex,colIndex,store){
return '<img src="edit.png" />&nbsp;<img src="delete.png" />&nbsp;<img src="update.png" />';
}}
});

Thanking you,
sureace.

fay
26 May 2011, 10:46 PM
Why not just use Ext.grid.ActionColumn (http://dev.sencha.com/deploy/ext-3.3.1/docs/?class=Ext.grid.ActionColumn)s for this? There's an example in the docs.

sureace
29 May 2011, 9:07 PM
Hi fay,
Thank you very much.
Regards,
sureace