Author Topic: grid.deleteRow is not Working while remote loading  (Read 443 times)

swapnilsu

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 4
    • View Profile
grid.deleteRow is not Working while remote loading
« on: February 02, 2022, 02:07:45 pm »
Hi Team,

The issue with delete multiple
1.When grid is initially loaded and select all rows its working fine no issue.
2.But when we scroll down its loading some more rows and select all and try to delete its not deleted for first time but in second time click its working. can you please help me here I need to delete records for when user is going to click first time he don't need to click on second time.

Here is code
                             var arr = [];
                            ids.map(function (value) {
                                arr.push({ rowIndx: value });
                            });

                            grid.deleteRow({
                                rowList: arr
                            });
                            jalert("cancelConfirm", "hide");
                            var gridID = $($(e).parent('div').prevObject[0].currentTarget).closest('.jsGridContainer')[0].id;
                            bdeleteRecord = true;
                            $("#" + gridID + " .jsSaveChanges").trigger('click');

Here is saveMethode

if (grid.isDirty() && grid.isValidChange({ focusInvalid: true }).valid) {}

grid.isDirty() is getting false for first click



 

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 5641
    • View Profile
Re: grid.deleteRow is not Working while remote loading
« Reply #1 on: February 06, 2022, 10:04:14 pm »
Currently that's the limitation of batch editing with remote paging. The changes should be committed before loading new rows, otherwise loading new rows leads to rollback of previous changes.

https://paramquery.com/pro/demos/editing_infinite_scroll