KendoUI TreeView试图将脏属性添加到Poco并获取Uncaught TypeError:e.slice不是一个函数(KendoUI TreeView trying to add dirt

系统教程 行业动态 更新时间:2024-06-14 16:58:30
KendoUI TreeView试图将脏属性添加到Poco并获取Uncaught TypeError:e.slice不是一个函数(KendoUI TreeView trying to add dirty property to Poco and getting Uncaught TypeError: e.slice is not a function)

好的,所以在Kendo UI树视图中,我正在尝试将属性添加到我的c#poco中,但是一旦我这样做,我就会在chrome dev工具中 出错

未捕获的TypeError:e.slice不是函数

我正在阅读有关添加到模型的内容,所以我添加了脏:“脏”

schema: { model: { id: "Id", dirty: "dirty", hasChildren: "Id" } }

然后添加C#poco属性导致问题

public bool dirty { get; set; }

我首先想要脏属性的原因是因为我没有使用kendo sync()方法,而且当我吐出数据源时我看到了

console.log(mydatasource.data());

然后我看到数组中的“ ”。

我已经为孩子做了同样的事情,无论我是否扩展了树视图(只有在调用mvc控制器方法时扩展节点时才有子节点)

// my children nodes public List<Students> items { get; set; }

items是在生成的数组中 ,没有问题..

为什么“ ”问题?

Ok, so on a Kendo UI treeview i'm trying to add a property into my c# poco, but as soon as I do I get an error in chrome dev tools

Uncaught TypeError: e.slice is not a function

I was reading about adding to the model, so I added dirty:"dirty"

schema: { model: { id: "Id", dirty: "dirty", hasChildren: "Id" } }

Then C# poco property added that causes the problem

public bool dirty { get; set; }

The reason that I want the dirty property in the first place is because I'm not using kendo sync() method, and I see that when I spit out the datasource

console.log(mydatasource.data());

Then I see that "dirty" is in the array.

I have already done the same for children and regardless if I expand the treeview or not ( has children only if expanding a node as it calls up mvc controller method)

// my children nodes public List<Students> items { get; set; }

items is in the array that is generated and causes no problem..

Why is "dirty" a problem?

最满意答案

好吧,我不使用dirty因为这不是一个需要或好主意。

Well, I don't use dirty as that was not a needed or good idea.

更多推荐

本文发布于:2023-04-15 03:29:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/dzcp/6c78aaddd8fc220bdea0bed43ef8a15a.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:属性   一个函数   Uncaught   Poco   KendoUI

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!