tonytomov / jqGrid

jQuery grid plugin
www.trirand.com
2.84k stars 1.2k forks source link

In multiselect mode, deleted row id will be get if it's checked when delete. #935

Closed liulinwjzx closed 4 years ago

liulinwjzx commented 5 years ago

In multiselect mode, deleted row id will be get if it's checked when delete.

Test:

  1. Open http://www.guriddo.net/demo/bootstrap/selection/checkbox/index.html.
  2. F12 to open console, and check data 1010.
  3. Run code in console to delete 1010: $("#jqGrid").delRowData(1010).
  4. Check data 1012, and run code in console: $("#jqGrid").getGridParam("selarrrow"), return value is [1010, 1012], but not [1012].

To resolve it, i should do $jq.resetSelection(rowid).delRowData(rowid) when server delete data success, I think it's extra invoking and hope it can be repaired.

tonytomov commented 5 years ago

Hello,

Thanks. I have fixed the bug. The problem was that the delRowData is called with integer parameter which is used in searching in selarrrow array, which values are string.

If you call it with

...
$("#jqGrid").delRowData("1010");

then this will work correct.

Please, let me know if it is fixed for you.

Bear Regards

liulinwjzx commented 5 years ago

Thanks for fixing. Bear Regards Too.