Creating a Dynamic Kendo Menu

1 posts, 1 answers
  1. Answer
    Vivek avatar
    18 posts
    Member since:
    Apr 2011

    Posted 07 May 2013 Link to this post

    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") _
                                mappings.For(Of MenuCategory)(
                                                Sub(item, menu)
                                                        item.Text = menu.Name
                                                End Sub) _
                                                                    Return menu.SubItem
                                                            End Function)
                                            mappings.For(Of MenuItem)(
                                                            Sub(item, menuItem)
                                                                    item.Text = menuItem.Name
                                                            End Sub)
                                            End Sub
                                    End Sub)
                        End Sub)
Back to Top