Adding PanelBar(another Kendo Component) inside Menu

2 posts, 0 answers
  1. Erick
    Erick avatar
    4 posts
    Member since:
    Sep 2012

    Posted 29 Jan 2013 Link to this post

    Hello.

    I want to add a PanelBar inside a Menu, because I need expanded/collapsed fields inside the menu
    I tried this:

    @(Html.Kendo().Menu().Name("Menu")
        .Items(items =>
        {
            items.Add().Text("Products")
            .Items(children =>
            {
                children.Add().Text("Furniture");
            });
            items.Add().Text("Stores")
            .Content(@<text>
                    @(Html.Kendo().PanelBar().Name("panelbar").ExpandMode(PanelBarExpandMode.Multiple)
                    .HtmlAttributes( new { style = "width: 300px" })
                    .Items(panelbar =>
                    {
                        panelbar.Add().Text("My TeamMates")
                        .Items(it =>
                        {
                            it.Add().Text("First");
                            it.Add().Text("Second");
                        });
                    })
                )
            </text>);
        })
    )
    But the panel is interpreted as children and his items as inner children.

    Many thanks.
  2. Petur Subev
    Admin
    Petur Subev avatar
    1882 posts

    Posted 31 Jan 2013 Link to this post

    Hello Erick,

    Adding PanelBar inside a Menu item is not supported. Both widgets are similar and they are using same classes (since they share common visual styles) for their HTML elements which causes the CSS selectors to produce such look and behavior.

    Kind Regards,
    Petur Subev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Kendo UI is VS 2017 Ready
Back to Top