PDA

View Full Version : Event after grid redraws rows following crud update



Jangla
31 May 2013, 1:09 AM
I've a requirement to add some pretty tooltips to a row action icon in a grid - I'm not using Ext qtips and won't go into the reasons why :D . Sounds simple enough and at a 'first page load' level, actually works nicely by hooking into the afterrender event of the grid and calling the tooltip init.

Thing is, the grid also uses crud to save and update and this results in the rows being redrawn when there's an update to the underlying store. The existing tooltips no longer work.

So, my question is; is there another event I'm missing that fires once the redraw takes place so I can re-hook the tooltips?

jasewell
31 May 2013, 9:30 AM
Ext.grid.View has a 'refresh' event. You'd add a listener to your grid config like so.


...
viewConfig: {
listeners: { refresh: function(gridView, eOpt); }
},
...

Jangla
31 May 2013, 1:24 PM
Of course! I always forget about the viewConfig option on grids!!!

Thanks a million! Works like a charm. :D