I am trying to read a Model class which should be populated with menu data from the database and then trying to bind that data to the Kendo Menu. I have copied the razor syntax given in the kendo docs (C# Version) and tried to convert it into VB.NET but i am getting an error that no bindto method accepts this many arguments and i can't figure what the error is? i have pasted the code as following, could someone please have a look and point me in the right direction (Menu and MenuItem are model classes)?
@Imports test.Models
@ModelType IEnumerable(Of MenuCategory)
@(Html.Kendo().Menu() _
.Name("TestMenu") _
.BindTo(Model,
Sub(mappings)
mappings.For(Of MenuCategory)(
Sub(x)
x.ItemDataBound(
Sub(item, menu)
item.Text = menu.Name
End Sub) _
.Children(
Function(menu)
Return menu.SubItem
End Function)
mappings.For(Of MenuItem)(
Sub(x)
x.ItemDataBound(
Sub(item, menuItem)
item.Text = menuItem.Name
End Sub)
End Sub
)
End Sub)
End Sub)
)
@Imports test.Models
@ModelType IEnumerable(Of MenuCategory)
@(Html.Kendo().Menu() _
.Name("TestMenu") _
.BindTo(Model,
Sub(mappings)
mappings.For(Of MenuCategory)(
Sub(x)
x.ItemDataBound(
Sub(item, menu)
item.Text = menu.Name
End Sub) _
.Children(
Function(menu)
Return menu.SubItem
End Function)
mappings.For(Of MenuItem)(
Sub(x)
x.ItemDataBound(
Sub(item, menuItem)
item.Text = menuItem.Name
End Sub)
End Sub
)
End Sub)
End Sub)
)