Hi,
we have a grid that is using SmartRendering and also Multiselect so the user can delete multiple rows at once.
In the grid initialization we use the setAwaitedRowHeight option and we use the default css for the grid.
When the user chooses to delete rows from the grid we call the folowing method:
function deleteItems()
{
var item_id = grid.getSelectedRowId();
$.ajax({
type: "POST",
async: true,
url: "/Data/RemoveItem",
data: {
item_id: item_id
},
success: function (data) {
if (data == "OK") {
var ids = item_id.split(',');
for (var i = 0; i < ids.length; i++) {
try {
grid.deleteRow(ids[i]);
} catch (err) { }
}
}
}
});
}
We load 50 rows before the grid makes a server call and the user can only see 30 rows , so if he selects all 30 of them,
and we start deleting them, somewhere in the middle of the deletion it will load up the onXLS event for all of the remaining rows that arent deleted.
After that the onXLE event is called to fill out the blank space in the grid and if we delete another 30 rows again this time the deleteItems() function
will delete all the rows and onXLE won’t get called because we still have more rows to see before making the server call to get another 50 rows.
Somehow after the second deletion the grid layout is little messed up, i cant multiselect rows and i checked with grid.getAllRowIds() the grid object
still remembers one or more of the old id’s that we deleted but they are not present in the grid.
It seems that the grid object and the rows that we see in the grid are not synced very well.