Hi,
I would like to delete row which has specific column value, but my code below only can delete one row not many. How could i delete all the row with that matching criteria?
Let say i have a grid product, description, status. I want to delete all rows with status 1.
var rows = mygrid.datagrid('getRows');
var idx = null;
for (i = 0; i < rows.length; i++) {
if (rows[i].status === '1') {
idx = mygrid.datagrid('getRowIndex', rows[i]);
mygrid.datagrid('deleteRow', idx);
}
}
Thanks