I need the parent's item while binding the child item setting it's action. I need to pass the categoryName from the category (parent) on the child action call. Is this possible? If so, how? Any help is very much appreciated!
Here is the panelbar code:
Here is the panelbar code:
@(Html.Kendo().PanelBar()
.Name("MainMenu")
.ExpandMode(PanelBarExpandMode.Single)
.BindTo(Model, mappings =>
{
mappings.For<
GMCWeb.Areas.bi.Models.ReportCategory
>(binding => binding
.ItemDataBound((item, category) =>
{
item.Text = "<
div
class
=
'row'
><
div
class
=
'col-md-9'
>" + category.categoryName + "</
div
><
div
class
=
'col-md-3 menu-arrow'
><
i
class
=
'fa fa-arrow-circle-right fa-2x'
></
i
></
div
></
div
>";
item.Encoded = false;
})
.Children(category => category.reportCategories));
mappings.For<
GMC.CustomerInformation.DashboardParameters.ReportCategoryInformation
>(binding => binding
.ItemDataBound(
(item, reportCategory) =>
{
item.Text = reportCategory.ReportCategoryName;
item.Enabled = !reportCategory.Disabled;
item.Action("GetReports", "Home", new RouteValueDictionary { { "category", category.categoryName } });
}));
}))