我怎样才能使它工作?
我想把删除图标放在我的网格中,就像一个带有弹出确认的列操作。您要删除 x 项吗?
做了这样的事情,但它不起作用
{
xtype: 'actioncolumn',
width: 50,
items: [
{
icon: 'delete.gif', // Use a URL in the icon config
tooltip: 'Delete Product',
handler: function (grid, rowIndex, colIndex) {
var rec = store.getAt(rowIndex);
var id = rec.get('ID');
Ext.MessageBox.show({
title: 'Save Changes?',
msg: 'Do you want to delete ' + rec.get('Name') + ' ?',
buttons: Ext.MessageBox.OKCANCEL,
fn: showResult
});
}
}
]
}