I am trying to delete/add rows to a grid.
Let's say for delete, I have created an actioncolumn like this:
{
xtype: 'actioncolumn',
width: 30,
sortable: false,
menuDisabled: true,
items: [{
icon: 'images/delete.png',
scope: this,
handler: this.onRemoveClick
}]
}
And the handler:
onRemoveClick: function(grid, rowIndex){
this.getStore().removeAt(rowIndex);
}
But for some reason, I get the error:
"Uncaught TypeError: Object [object Object] has no method 'getStore'"
I copied the code from here, but it doesn't seem to work for me.