Hi,
I need to delete multiple rows from grid.
I tried two solution according your references (see below). Unintentionally only the first record in the index array gets deleted from the grid.
Is there a solution for this problem?
Regards
function RemoveRecordsFromGrid(arrRowIndxs)
{
alert(arrRowIndxs.join('\n')); // e.g. [0,2]
if (arrRowIndxs.length != 0)
{
for (var i = 0; i < arrRowIndxs.length; i++)
{
//----- Solution 1 ----------
$("#grid_rowhover").pqGrid("deleteRow", { rowIndx: arrRowIndxs, track: false });
//------ Solution 2 ----------
//var DM = $("#grid_rowhover").pqGrid("option", "dataModel");
//alert("REmoving row from Grid " + arrRowIndxs);
//DM.data.splice(arrRowIndxs, 1);
//$("#grid_rowhover").pqGrid("refreshDataAndView");
//$("#grid_rowhover").pqGrid("setSelection", { rowIndx: arrRowIndxs });
}
}
else
{
alert("No Records to Remove");
}
}