使用 gridview 滚动后,jqgrid 的多个复选框未被选中:true

Multiple checkboxes at jqgrid have gone uncheked after scroll with gridview: true

示例来自 http://www.trirand.net/demo/javascript/jqgrid/loading_data/scrollbar/index.html Guriddo jqGrid JS 的版本:4.7.0 和 4.7.1。添加gridview: true重复错误

(function ($) {
  'use strict';
  $(function () {
    $('#jqGrid').jqGrid({
      url: 'http://trirand.com/blog/phpjqgrid/examples/jsonp/getjsonp.php?callback=?&qwery=longorders',
      mtype: 'GET',
      datatype: 'json',
      page: 1,
      colNames: ['Order ID', 'Customer ID', 'Order Date', 'Freight', 'Ship Name'],
      colModel: [{
        name: 'OrderID',
        key: true,
        width: 75
      }, {
        name: 'CustomerID',
        width: 150
      }, {
        name: 'OrderDate',
        width: 150
      }, {
        name: 'Freight',
        width: 150
      }, {
        name: 'ShipName',
        width: 150
      }],
      width: 750,
      height: 250,
      rowNum: 20,
      gridview: true,
      scroll: 1, // set the scroll property to 1 to enable paging with scrollbar - virtual loading of records
      emptyrecords: 'Scroll to bottom to retrieve new page', // the message will be displayed at the bottom
      pager: '#jqGridPager'
    });
  });
})(jQuery);

当您 select 页面 X 上的一些复选框向下滚动,然后返回页面 X 时,复选框变为未选中状态,但 selection 是仍然适用,并且 .jqGrid('getGridParam', 'selarrrow') returns select 行。该问题仅在 gridview: true 时重复出现。我做了一些 demo screencast 重复错误。

我可以确认这是 jqGrid 4.7 和免费 jqGrid 4.8 中的错误。

我修复了 free jqGrid (see here). The demo 中的问题,使用来自 github 的当前资源,并且在使用虚拟滚动的情况下复选框的状态没有问题。