This is a migrated thread and some comments may be shown as answers.

Adding PanelBar(another Kendo Component) inside Menu

1 Answer 87 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Erick
Top achievements
Rank 1
Erick asked on 30 Jan 2013, 04:20 AM
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.

1 Answer, 1 is accepted

Sort by
0
Petur Subev
Telerik team
answered on 31 Jan 2013, 04:30 PM
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!
Tags
Menu
Asked by
Erick
Top achievements
Rank 1
Answers by
Petur Subev
Telerik team
Share this question
or