Sure.
You just need to provide an ItemDataBound lambda to be able to specify extra html attributes upon the binding of the sub-menu-elements
Here's a sample:
@(Html.Kendo().PanelBar()
.Events(events => events.Select("OnMenuSelect"))
.Name("panelbar")
.BindTo(Model, mappings =>
{
mappings.For<
KendoUIMvcApplication4.Models.MenuItemModel
>(binding => binding
.ItemDataBound((kendoMenuItem, menuItem) =>
{
kendoMenuItem.Text = menuItem.Nom;
//you can also add data to the top level menu item if you wish. Also by the HtmlAttributes property.
})
.Children(menuItem => menuItem.SousMenu));
mappings.For<
KendoUIMvcApplication4.Models.SubMenuItemModel
>(binding =>
binding
.ItemDataBound((kendoSubMenuItem, subMenuItem) =>
{
kendoSubMenuItem.Text = subMenuItem.Nom;
kendoSubMenuItem.HtmlAttributes.Add("data-url", subMenuItem.Url);
kendoSubMenuItem.HtmlAttributes.Add("data-group", subMenuItem.Group);
}));
})
)
Hope this helps.