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

[Solved] PanelBar Hierarchy

1 Answer 116 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
erick
Top achievements
Rank 1
erick asked on 02 Jul 2011, 05:35 PM
is the method to bind to hierarchy model change?
because the snippet from the Help not working

there's no "For" method :(..
@(Html.Telerik().PanelBar()
        .Name("PanelBar")
        .HtmlAttributes(new { style = "width: 300px;" })
        .BindTo(Model, mappings =>
        {
            mappings.For<Category>(binding => binding
                    .ItemDataBound((item, category) =>
                    {
                        item.Text = category.CategoryName;
                    })
                    .Children(category => category.Products));
            mappings.For<Product>(binding => binding
                    .ItemDataBound((item, product) =>
                    {
                        item.Text = product.ProductName;
                    }));
        })
)

1 Answer, 1 is accepted

Sort by
0
erick
Top achievements
Rank 1
answered on 04 Jul 2011, 02:45 AM
found the solution

just paste along the code and change it eventhough the intellisense don't show up :(
learn it for 2 days hard way :((
Tags
PanelBar
Asked by
erick
Top achievements
Rank 1
Answers by
erick
Top achievements
Rank 1
Share this question
or