Hi there,
I am attempting to get the Treeview template to work, similar to the demo for the MVC treeview:
<
script
id
=
"treeview-template"
type
=
"text/kendo-ui-template"
>
#: item.text #
# if (!item.items) { #
<
a
class
=
'delete-link'
href
=
'\#'
></
a
>
# } #
</
script
>
<
div
class
=
"row"
>
<
div
class
=
"form-group col-md-12"
>
@(Html.Kendo().TreeView()
.Name("treeview")
.TemplateId("treeview-template")
.DataTextField("Name")
.DragAndDrop(true)
.DataSource(dataSource => dataSource
.Read(read => read
.Action("Parties", "TreeView")
)
)
.Events(events => events
.Drop("onDrop")
)
)
</
div
>
</
div
>
However, the item.text expression always evaluates as undefined - not sure what I am doing wrong? If I remove this, the item.items expression on the next line is correctly evaluated.
Thanks,
Paul