This question is locked. New answers and comments are not allowed.
MVC 2 on .NET 4, Telerik Extensions for ASP.NET MVC (2010_2_713)
Here is model:
public
class
MenuItem
{
public
string
Id {
get
;
set
; }
public
string
Name {
get
;
set
; }
public
List<MenuItem> ChildItems {
get
;
set
; }
public
string
Url {
get
;
set
; }
}
Here is how model binds to PanelBar
Html.Telerik().PanelBar()
.Name(
"SportNav"
)
.BindTo(Model, mappings =>
{
mappings.For<MenuItem>(binding => binding
.ItemDataBound((item, sports) =>
{
item.Text = sports.Name;
})
.Children(sports => sports.ChildItems));
})
There are multiple levels of MenuItem object in the model, all levels are bound correctly, except it loses indentation, starting from the 3rd level. It looks like:
Level 1
Level 2
Level 3
Level 4
......
Are there anything missing? Thanks
Regards
K Wu