Binding the data from a Model..problem with the childrens

2 posts, 0 answers
  1. Michele
    Michele avatar
    426 posts
    Member since:
    Jun 2009

    Posted 04 Sep 2013 Link to this post

    I'm currently trying to develop a menu binding the data from the datasource.... I've folowed your example at

    but I'm not able to load the children
    @(Html.Kendo().Menu().Name("menu").BindTo(Model, mappings =>
            mappings.For<IDEA20.DO.Common.MenuItem>(binding =>
                    binding.ItemDataBound((item, category) => //define mapping between menu item properties and the model properties
                                    item.Text = category.Text;
                                }).Children(category => category.SubMenu);
    My MenuItem is of type

    public class MenuItem
        public MenuItem()
            SubMenu = new List<MenuItem>();
        public string Text { get; set; }
        public string Controller { get; set; }           
        public string Action { get; set; }
        public bool Selected { get; set; }
        public List<MenuItem> SubMenu { get; private set; }
    What am I doing wrong? It only shows the first, it puts the arrow for opening but won't open...


  2. Georgi Krustev
    Georgi Krustev avatar
    3747 posts

    Posted 06 Sep 2013 Link to this post

    Hi Paolo,

    I prepared a test application, which shows how to define the child menu items.
    As a side note, I will suggest you continue our discussion in the support thread opened on the same matter.

    Georgi Krustev
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top