I需要在单击extjs网格操作列中的图标时更改该图标的背景色
handler: function(grid, rowIndex, colIndex) {
//Need to change the delete icon with add icon
}
http://jsfiddle.net/mohansee/6afxy/6/
var deleteBttn = Ext.query('td.x-action-col-cell img',grid.getNode(rowIndex))[0];
deleteBttn.src = 'http://etf-prod-projects-1415177589.us-east-1.elb.amazonaws.com/trac/docasu/export/2/trunk/client/extjs/shared/icons/fam/add.gif';
通过在处理程序部分添加上面的代码修复了它。
如果您不在分页网格中或在分页网格的同一页上,则此操作正常,但不适用于分页网格。