【问题标题】:rownumbers is not working in jsgrid, want to show total numbers of records (row)rownumbers 在 jsgrid 中不起作用,想要显示记录总数(行)
【发布时间】:2018-04-23 12:17:28
【问题描述】:

rownumbers 在 jsgrid 中不起作用,想要显示记录总数(行)。我想在分页数据的右侧显示它。

$("#jsgrid").jsGrid({
    autoload: true,
    width: "100%",
    filtering: true,
    editing: true,
    paging: true,
    multiselect:true,
    pageSize: 3,
    pageButtonCount: 2,
    sorting: true,
    rownumbers:true,
    controller: {
        loadData: function() {
            return data;
        }
    },
});

Jsfiddle Link

【问题讨论】:

  • 请在标签中正确。你标记了jqGrid,但实际上你使用的是jsgrid,这是一个非常难的产品。请将标签更正为您使用的正确产品。
  • 输入错误..
  • 已修复,另外括号和缩进更正
  • 我在documentation 中没有看到任何rownumbers 参数

标签: jquery jquery-plugins jsgrid


【解决方案1】:

根据documentation,你可能需要pageFormat,使用{itemCount}来显示物品数量:

$("#jsgrid").jsGrid({
    /* Other parameters here */
    pagerFormat: "Pages: {first} {prev} {pages} {next} {last}    {pageIndex} of {pageCount} Total rows: {itemCount}"
});

【讨论】:

  • 谢谢哥们。 @nicolas-cami
  • 当结果/项目小于页面大小时,它不会显示
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-01-30
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多