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

[Solved] Problem for BindTo method fo Menu

0 Answers 30 Views
Menu
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Phileas
Top achievements
Rank 1
Phileas asked on 15 Nov 2010, 08:02 AM
I make a practic of Telerik Mvc control.
When I use Menu control, and use bind model function, it prompts me that  "Invalid parameter".
Why?

<%= Html.Telerik().Menu()
        .Name("Menu")
        .BindTo(Model, mappings => 
        {
            mappings.For<tPermission>(binding => binding
                    .ItemDataBound((item, permission) =>
                    {
                        item.Text = permission.PermissionName;
                    })
                    .Children(permission => permission.tPages));
            mappings.For<tPage>(binding => binding
                    .ItemDataBound((item, page) =>
                    {
                        item.Text = page.PageName;
                    }));
        })
%>



Thanks
Phileas
Tags
Menu
Asked by
Phileas
Top achievements
Rank 1
Share this question
or