javascript - 使用 gridview 滚动后,jqgrid 的多个复选框已取消选中 : true

标签 javascript jquery jqgrid jqgrid-asp.net multipleselection

示例来自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);

当您选择页面 X 上的某些复选框并向下滚动,然后返回页面 X 时,复选框将变为未选中状态,但仍会应用选择,并且 .jqGrid('getGridParam', 'selarrrow') 返回选定的行。仅当 gridview: true 时才会出现此问题。我做了一些demo screencast重复的错误。

最佳答案

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

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

关于javascript - 使用 gridview 滚动后,jqgrid 的多个复选框已取消选中 : true,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29121235/

相关文章:

jquery日期选择器将包含日期时间的字符串中的日期格式设置为 'MM-DD-YYYY'

c# - MVC&EF : remove time from datetime

jquery - jqgrid resizeStop 不触发

javascript - 每个循环的值不会被返回

javascript - 从 html 表单设置 cookies

javascript - 取消绑定(bind)点击后的对象的点击事件?

jqGrid - 编辑表单中的分组字段

javascript - JS音频-audioBuffer getChannelData转换为频率

javascript - AngularJS (HTML, CSS) 在客户端转为 pdf

javascript - jqGrid 以编程方式选择行