首页 asp.Net asp.net-mvc – KendoUI网格显示总记录数

asp.net-mvc – KendoUI网格显示总记录数

我使用kendoUI网格来显示表中的记录.我想显示的记录总数如此表.就像是 显示1-20共1203条记录 有没有办法使用KendoUI网格显示总记录数? 所有你需要做的是将它添加到你的.kendoGrid dataBound: function (e) { //total bits needs to be removed because dataB

我使用kendoUI网格来显示表中的记录.我想显示的记录总数如此表.就像是

显示1-20共1203条记录

有没有办法使用KendoUI网格显示总记录数?

解决方法

所有你需要做的是将它添加到你的.kendoGrid

dataBound: function (e) {
            //total bits needs to be removed because dataBound fires every time the gird pager is pressed.
            $('#totalBits').remove();
            //add the total count to the pager div.  or whatever div you want... just remember to clear it before you add it.
            $('.k-grid-pager').append('<div id="totalBits">' + this.dataSource.total() + '</div>')
     }

本文来自网络,不代表青岛站长网立场。转载请注明出处: https://www.0532zz.com/html/kaifa/asp-net/20201230/14001.html
上一篇
下一篇

作者: dawei

【声明】:青岛站长网内容转载自互联网,其相关言论仅代表作者个人观点绝非权威,不代表本站立场。如您发现内容存在版权问题,请提交相关链接至邮箱:bqsm@foxmail.com,我们将及时予以处理。

为您推荐

返回顶部