Ext4官方的案例第一个,array-grid,里面的actioncolumn
xtype: 'actioncolumn', width: 50, items: [{ icon : '../shared/icons/fam/delete.gif', // Use a URL in the icon config tooltip: 'Sell stock', handler: function(grid, rowIndex, colIndex) { var rec = store.getAt(rowIndex); alert("Sell " + rec.get('company')); } }, { getClass: function(v, meta, rec) { // Or return a class from a function if (rec.get('change') < 0) { this.items[1].tooltip = 'Hold stock'; return 'alert-col'; } else { this.items[1].tooltip = 'Buy stock'; return 'buy-col'; } }, handler: function(grid, rowIndex, colIndex) { var rec = store.getAt(rowIndex); alert((rec.get('change') < 0 ? "Hold " : "Buy ") + rec.get('company')); } }]可以那个getClass那里设置,用rec.get('xxx')来获取所在行xxx字段的值,根据不同的值返回css设置的图标。