PDA

View Full Version : Removing Rows From a Grid



lukefowell89
18 Jan 2011, 2:16 AM
I have an extended grid, which I am using to create formulas, which can then be dragged on to a canvas. The formulapad is a grid with 3 columns, the 3rd column being a button to remove that item/row.

Here is the code for when the cell is clicked



cellclick : function(grid, rowIndex, columnIndex, e){
grid.selectedRow = rowIndex;

if (columnIndex == 2){
grid.store.removeAt(rowIndex);
}
}


The problem is that when I click on any of the buttons except the bottom one, it will hide all the items below that one. Although it doesnt remove them, from the store, it just hide them. But when I hide the formulapad and then show it again. It will display correctly. Also the total in the footer of the formula pad is correct.

I just need the grid rows below the one I am deleting to move up and stay visible.

2433124332