简体   繁体   English

Kendo网格MVC5,未显示记录数

[英]Kendo grid MVC5,count of no of records is not showing

Using kendo grid for displaying the data,instead of the count it showing NAN of NAN items. 使用kendo网格来显示数据,而不是使用计数来显示NAN of NAN项目。 How can I solve this? 我该如何解决?

I solved this issue by using this code in schema Thankss.... 我通过在模式谢谢中使用此代码解决了此问题。

 schema: {
                data: "Data",
                total: function (response) {
                    return response.Total;
                },

There are 2 options, the first you already found it: define a function that computes total . 有2个选项,第一个您已经找到了:定义一个计算total的函数。 The second, in your case, it's much simpler since you only need to say which fields includes the total . 在您的情况下,第二个要简单得多,因为您只需要说出哪些字段包括total

Something like: 就像是:

schema: {
    data: "Data",
    total: "Total"
}

For more information check the manual here . 有关更多信息,请在此处查看手册。

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM