or
@(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 } });
}));
}))
public
class
MyParentViewModel
{
public
IEnumerable<MyChildViewModel> Children
{
get
;
set
;
}
}
public
class
MyChildViewModel
{
public
String DummyString
{
get
;
set
;
}
public
Boolean? DummyBoolean
{
get
;
set
;
}
}
@model MyParentViewModel
@(
Html.Kendo().Grid(Model.Children)
.Name("Children")
.Deferred()
.Columns(c =>
{
c.Bound(x => x.DummyString);
c.Bound(x => x.DummyBoolean);
});
)
@model Boolean
@(
Html.Kendo().DropDownListFor(x => x)
.Deferred()
.Items(items =>
{
items.Add().Selected(value == false).Text("Non").Value(Boolean.FalseString);
items.Add().Selected(value == true).Text("Oui").Value(Boolean.TrueString);
})
.HtmlAttributes(new { style = "width:100px; line-height:normal;" })
)
<
div
class
=
"k-widget k-grid k-secondary"
id
=
"Groupements"
data-role
=
"grid"
>
<
table
role
=
"grid"
>
<
colgroup
>
<
col
style
=
"width:20%"
>
<
col
>
</
colgroup
>
<
thead
class
=
"k-grid-header"
>
<
tr
>
<
th
class
=
"k-header"
data-field
=
"DummyString"
data-title
=
"DummyString"
scope
=
"col"
>
<
span
class
=
"k-link"
>DummyString</
span
>
</
th
>
<
th
class
=
"k-header"
data-field
=
"DummyBoolean"
data-title
=
"DummyBoolean"
scope
=
"col"
>
<
span
class
=
"k-link"
>DummyBoolean</
span
>
</
th
>
</
tr
>
</
thead
>
<
tbody
>
<
tr
>
<
td
>Groupement #1</
td
>
<
td
>
<
input
disabled
=
"disabled"
id
=
"DummyBoolean"
name
=
"DummyBoolean"
style
=
"width:100px; line-height:normal;"
type
=
"text"
value
=
"True"
>
<
script
>
jQuery(function () { jQuery("#DummyBoolean").kendoDropDownList({ "dataSource": [{ "Text": "Non", "Value": "False", "Selected": false }, { "Text": "Oui", "Value": "True", "Selected": true }], "dataTextField": "Text", "dataValueField": "Value" }); });
</
script
>
</
td
>
</
tr
>
<
tr
class
=
"k-alt"
>
<
td
>Groupement #2</
td
>
<
td
>
<
input
disabled
=
"disabled"
id
=
"DummyBoolean"
name
=
"DummyBoolean"
style
=
"width:100px; line-height:normal;"
type
=
"text"
value
=
"True"
>
<
script
>
jQuery(function () { jQuery("#DummyBoolean").kendoDropDownList({ "dataSource": [{ "Text": "Non", "Value": "False", "Selected": false }, { "Text": "Oui", "Value": "True", "Selected": true }], "dataTextField": "Text", "dataValueField": "Value" }); });
</
script
>
</
td
>
</
tr
>
</
tbody
>
</
table
>
</
div
>