Author Topic: The deletRow function operates abnormally.  (Read 1378 times)

qbsoft

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 7
    • View Profile
The deletRow function operates abnormally.
« on: January 29, 2021, 03:43:58 pm »
Hello.

I checked the abnormal operation of the deleteRow function.

The data I am testing is a list of 5 pages in total.
DeleteRow works normally on page 1 and 2.
However, it works abnormally on pages 3, 4, and 5.

The phenomenon is not deleting the selected row, but deleting the first row on the current page unconditionally.

The code I used is as follows.

Code: [Select]
var rowList = grid.Checkbox("state").getCheckedNodes().map(function (rowDataObj) {
            var rowIndxObj = grid.getRowIndx({ rowData: rowDataObj });
            return { rowIndx: rowIndxObj.rowIndx };
        });
        console.log(rowList);
        grid.deleteRow({ rowList: rowList });

The rowIndx stamped on the console is displayed correctly.

However, the first row is deleted unconditionally.

Please help me.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 5296
    • View Profile
Re: The deletRow function operates abnormally.
« Reply #1 on: January 29, 2021, 09:25:59 pm »
I checked your code in this example: https://paramquery.com/pro/demos/editing_batch, it works fine for every page.

Do you experience mentioned problem for local or remote paging.

Could you please share a jsfiddle / stackblitz.

qbsoft

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: The deletRow function operates abnormally.
« Reply #2 on: February 15, 2021, 01:52:45 pm »
Here is stackblitz url: https://web-platform-uaer86.stackblitz.io/

Check the check button and click the delete button located in the upper left corner.

The remote server is not ready. So I did local paging using json data. It's deleted normally like this.

But I don't do local paging, I do remote paging. So I think there is a problem with remote paging.

Is there an example of multi-deletion from a grid using remote paging?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 5296
    • View Profile
Re: The deletRow function operates abnormally.
« Reply #3 on: February 15, 2021, 04:55:05 pm »
Ok, I see the issue in delete rows with remote paging, I'm looking further into it for solution.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 5296
    • View Profile
Re: The deletRow function operates abnormally.
« Reply #4 on: March 28, 2021, 09:56:21 am »
This is fixed in v7.7.0