View Full Version : Prettify markup in GridPanel from rowselect

9 Jun 2010, 9:52 AM
I am having an issue trying to prettify some content in a GridPanel using a method similar to this one http://www.extjs.com/forum/showthread.php?64737-ExtJS-prettify-easy-way-to-highlight-your-code&highlight=prettify.

In the above example the panel loads it's content automatically using http request. In my situation, I load the content when a grid row is selected. I tried to add a listener to the grid row so that when the row is clicked, the prettyPrint() function is called.

Is it possible to add a listener to tell me when the content from the rowclick is rendered?
I cannot get this to work, so any help greatly appreciated.

grid.getSelectionModel().on('rowselect', function(sm, rowIdx, r) {
var detailPanel = Ext.getCmp('detailPanel');
codeTpl.overwrite(detailPanel.body, r.data);

detailPanel.on{'afterrender': function() { alert('hi'); } };