PDA

View Full Version : Grid cell link onclick binding lost after grid sort/filtering



lwalling
4 Jan 2011, 9:17 AM
I have a grid cell rendered with a function:

function compLinks(val) {
return '<a href="#" class="addTabX">' + val + '</a>'
}

Then inside the grid.on('afterlayout', function () I'm binding those links to a function like this:
Ext.select('.addTabX').on('click', openNewTab);

This works fine until the grid is sorted/filtered in any way. Is there another way to bind elements rendered inside grid cells that will keep the bindings when the grid is sorted/filtered?