Need to change the icon when a icon inside extjs grid action column is clicked

StackOverflow https://stackoverflow.com/questions/23226814

  •  07-07-2023
  •  | 
  •  

سؤال

I need to change the background color of icon inside extjs grid action column on clicking that icon.

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';

By adding the above code in the handler section fixed it.

نصائح أخرى

This works fine if you are not in paging grid or on the same page in the paging grid, it doesn't work for the paging grid.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top