我发现下面的代码会导致“TypeError: (intermediate value).toLowerCase is not a function”,这似乎是由工具栏模板定义引起的,但相同的工具栏定义在剑道网格中工作正常
$(document).ready(function(){
$("#treelist").kendoTreeList({
columns: [
{ field: "Name" },
{ field: "Position" }
],
dataSource: {
data: [
{ id: 1, parentId: null, Name: "Jane Smith", Position: "CEO" },
{ id: 2, parentId: 1, Name: "Alex Sells", Position: "EVP Sales" },
{ id: 3, parentId: 1, Name: "Bob Price", Position: "EVP Marketing" }
],
},
toolbar: [
{ template: '<a class="k-button" onclick="customSave(this)" href="\\#"><span class="k-icon k-i-tick"></span>custom save</a>' },
{ template: '<a class="k-button" onclick="customCancel(this)" href="\\#"><span class="k-icon k-i-cancel"></span>custom cancel</a>' }
]
});
});
有没有办法解决这个问题?(必须保留按钮图标)