Apologies for what I hope is a stupid question, given I'm new to MVC & web development.
I have a TreeView with manually added child nodes off the root. I then want to add child nodes to each of those nodes via a foreach loop
The code (that is wrong) is
@(Html.Kendo().TreeView()
.Name("treeview")
.Items(treeview =>
{
treeview.Add().Text("Root")
.Expanded(true)
.Items(root =>
{
root.Add().Text("Child")
.Expanded(true);
foreach(var item in Model.Entity.GrandChildData)
{
{add to Child } item.data;
}
Thanks