加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > asp.Net > 正文

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

发布时间:2020-12-15 20:19:40 所属栏目:asp.Net 来源:网络整理
导读:我使用kendoUI网格来显示表中的记录.我想显示的记录总数如此表.就像是 显示1-20共1203条记录 有没有办法使用KendoUI网格显示总记录数? 解决方法 所有你需要做的是将它添加到你的.kendoGrid dataBound: function (e) { //total bits needs to be removed bec
我使用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>')
     }

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读