Kendo JavaScript-加载而不是数据行

发布于 2025-02-01 19:15:37 字数 1034 浏览 4 评论 0原文

我有问题。这是我的代码:

var dataSource = new kendo.data.DataSource({
    data: [
        { YAxis: 1, LowLimit: 0, HighLimit: 100, Decimal: 2 }
    ],
    schema: {
        model: {
            fields: {
                YAxis: { type: "number", editable: false },
                LowLimit: { type: "number", validation: { required: true, min: 0 } },
                HighLimit: { type: "number", validation: { required: true, min: 0 } },
                Decimal: { type: "number", validation: { required: true, min: 0 } }
            }
        }
    }
});

var kendoWidget = {
    dataSource: dataSource,
    columns: [
        { field: "YAxis", title: "Y-Axis", editable: false },
        { field: "LowLimit", title: "Low Limit" },
        { field: "HighLimit", title: "High Limit" },
        { field: "Decimal", title: "Decimal" }],
    editable: true
};

如果我删除数据属性,则表效果很好,对我说“无数据”,但是如果添加数据属性,Console表示Kendo.All.min.js:27 Unturch typeerror:无法读取未定义的属性(阅读“ tolowercase”)。问题是什么?我不明白格式化有什么问题,知道Kendo的人可以帮助我吗?谢谢。

I have a problem. here is my code:

var dataSource = new kendo.data.DataSource({
    data: [
        { YAxis: 1, LowLimit: 0, HighLimit: 100, Decimal: 2 }
    ],
    schema: {
        model: {
            fields: {
                YAxis: { type: "number", editable: false },
                LowLimit: { type: "number", validation: { required: true, min: 0 } },
                HighLimit: { type: "number", validation: { required: true, min: 0 } },
                Decimal: { type: "number", validation: { required: true, min: 0 } }
            }
        }
    }
});

var kendoWidget = {
    dataSource: dataSource,
    columns: [
        { field: "YAxis", title: "Y-Axis", editable: false },
        { field: "LowLimit", title: "Low Limit" },
        { field: "HighLimit", title: "High Limit" },
        { field: "Decimal", title: "Decimal" }],
    editable: true
};

If I delete the data property the table works well and said to me "no data" but if I add the data property, console said kendo.all.min.js:27 Uncaught TypeError: Cannot read properties of undefined (reading 'toLowerCase'). What is the problem? I don't understand what's wrong in formatting, can someone who knows about kendo help me? Thank you.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文