【问题标题】:Kendo UI - Grid - Not showing pageable correctly [duplicate]Kendo UI - 网格 - 未正确显示可分页 [重复]
【发布时间】:2013-02-04 12:16:29
【问题描述】:

可能重复:
Kendo UI Grid Always Starts at Page 0

设置一个 Kendo UI 网格,其中大部分工作正常,但在页面加载时,可分页数据未正确加载。 (每页更改为10个后加载正确,右下角刷新后再次加载不正确)

我的代码:

    <div id="example" class="k-content">
        <div id="clientsDb">

            <div id="grid"></div>

        </div>

        <script>
            $(document).ready(function() {
                $("#grid").kendoGrid({
            dataSource: {
                transport: {
                    read: "data/weight.php"
                },
                schema: {
                    data: "data",

                },

                pageSize: 5

            },      height: 250,
                    scrollable: true,
                    sortable: true,
                    filterable: true,
                    pageable: {
                        refresh: true,
                        pageSizes: true
                    },
                    groupable: true,
                    selectable: true,

                    columns: [ {
                            field: "w_user",
                            width: 50,
                            title: "User"
                        } , {
                            field: "w_weight",
                            width: 70,
                            title: "Weight"
                        }, {
                            field: "w_stamp",
                            title: "Stamp",
                            width: 160,
                            template: '#= kendo.toString(w_stamp,"dd MMMM yyyy") #'
                        }, {
                            field: "w_comment",
                            title: "Comments"
                        }
                    ]
                });
            });
        </script>
    </div>

第一个屏幕(不正确): http://www.informatiebron.nl/images/scr1.png

第二个屏幕(正确): http://www.informatiebron.nl/images/scr2_correct.png

谁有办法解决这个问题?


https://stackoverflow.com/a/14255509/2039657 有解决方案/解决方法。谢谢你的建议。 就我而言,我需要该功能才能让它再次工作。

【问题讨论】:

    标签: jquery kendo-ui kendo-grid


    【解决方案1】:

    按照here 的建议,添加总行数可能会有所帮助:

    【讨论】:

      猜你喜欢
      • 2020-05-01
      • 2021-04-12
      • 2022-11-01
      • 1970-01-01
      • 2014-03-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-10
      相关资源
      最近更新 更多