Author Topic: i have a problem of method [deleteRow]  (Read 2412 times)

fings

  • Newbie
  • *
  • Posts: 12
    • View Profile
i have a problem of method [deleteRow]
« on: January 23, 2021, 02:35:34 pm »
excuse me,

i find a bug of the method [deleteRow];

like this config:
dataModel: { location: "remote"},
pageModel{ type: "remote"},

when i delete one row in page2 or more(page > 1) by method [deleteRow],

it's can not delete correct row of 2times or more,

this my code:

let sel_row = $pqgrid.SelectRow();
let selectArray = sel_row.getSelection();
let _rowIndex = selectArray[0].rowIndx;
$pqgrid.deleteRow({ rowIndx: _rowIndex });

remark: console.log(selectArray); data is correct;

i watch this demo,has same problem
https://paramquery.com/pro/demos/editing_remote_page

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: i have a problem of method [deleteRow]
« Reply #1 on: January 26, 2021, 01:07:09 pm »
Issue with API wr.t. paging is caused when rowIndx / rowIndxPage are used incorrectly.

Please read about rowIndx and rowIndxPage here: https://paramquery.com/pro/tutorial#topic-special-vars

fings

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: i have a problem of method [deleteRow]
« Reply #2 on: January 27, 2021, 12:59:12 pm »
Issue with API wr.t. paging is caused when rowIndx / rowIndxPage are used incorrectly.

Please read about rowIndx and rowIndxPage here: https://paramquery.com/pro/tutorial#topic-special-vars

thank you, i will earnest to read

fings

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: i have a problem of method [deleteRow]
« Reply #3 on: January 28, 2021, 03:36:42 pm »
about the bug of deleteRow

repair row 3398:

c.rowIndx = a ? f + l : f