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

[Solved] PanelBar issue

0 Answers 24 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.
reynald lawrence
Top achievements
Rank 1
reynald lawrence asked on 17 Oct 2012, 09:12 AM
Hi to all,

I'm replicating the telerik mvc PanelBar "Binding to Model", but receiving this error: 

CS1502: The best overloaded method match for 'Telerik.Web.Mvc.UI.PanelBarBuilder.BindTo(string, System.Action<Telerik.Web.Mvc.UI.PanelBarItem,Telerik.Web.Mvc.SiteMapNode>)' has some invalid arguments

Here's my panelbar script:
View:

@(Html.Telerik().PanelBar()
        .Name("GeneralDownloads")
        .HtmlAttributes(new { style = "width: 300px;" })
        .BindTo(Model, mappings => 
        {
            mappings.For<Model.ProductGroups>(binding => binding
                    .ItemDataBound((item, productGroup) =>
                    {
                        item.Text = productGroup.ProductName;
                    })
                    .Children(productGroup => productGroup.ProductFiles));
            mappings.For<Product>(binding => binding
                    .ItemDataBound((item, productFiles) =>
                    {
                        item.Text = productFiles.FileName;
                    }));
        })


Hope i can find solution,
Many Thanks!

Tags
PanelBar
Asked by
reynald lawrence
Top achievements
Rank 1
Share this question
or