Search code examples
javascriptc#kendo-uitreeviewkendo-treeview

KendoUI TreeView trying to add dirty property to Poco and getting Uncaught TypeError: e.slice is not a function


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?


Solution

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