or
<
div
data-role
=
"sparkline"
data-series
=
"[{ 'name': 'Orders', 'type': 'column', 'field': 'Combined.OrderCount' }]"
data-tooltip
=
"{ template: $('#rangeTooltipTemplate').html() }"
data-bind
=
"source: dataSource"
>
</
div
>
@using (Html.BeginScripts("Daily.Range.Order.Count"))
{
<
script
type
=
"text/html"
id
=
"rangeTooltipTemplate"
>
<
div
>#: kendo.toString(dataItem.Date, 'd')# (#: kendo.toString(dataItem.Date, 'ddd') #)</
div
>
<
div
>Count: #: value #</
div
>
</
script
>
}
<
div
data-role
=
"sparkline"
data-theme
=
"bootstrap"
data-series
=
"[{ 'name': 'Out the door', 'type': 'line', 'field': 'Performance.AvgOutTheDoor' }]"
data-tooltip
=
"{ template: $('#PerformanceToolTipOutTheDoor').html() }"
data-bind
=
"source: dataSource, visible: showCharts"
>
</
div
>
@using (Html.BeginScripts("Performance.Range.OutDoorTime", Area.Foot))
{
<
script
id
=
"PerformanceToolTipOutTheDoor"
type
=
"text/template"
>
<
div
>#: kendo.toString(dataItem.Date, 'd')# (#: kendo.toString(dataItem.Date, 'ddd') #)</
div
>
<
div
>Out the door: #: value #</
div
>
</
script
>
}
@(Html.Kendo().Grid<
LFG.Model.Domain.ArticleGroup
>(Model.ArticleGroups)
.Name("groupsGrid")
.Columns(columns =>
{
columns.Bound(o => o.ID);
columns.Bound(o => o.GroupKey);
columns.Bound(o => o.Description);
})
.Pageable()
.Sortable()
.Scrollable()
.Selectable()
.DataSource(dataSource => dataSource
.Ajax()
.PageSize(LFG.Web.Constants.GridPageSize)
.Events(events => events.Error("grid_error_handler"))
.Model(model =>
{
model.Id(p => p.ID);
})
.ServerOperation(false)
)
.Events(e => e.Change("onRowSelect"))
)
@(Html.Kendo().Grid<
LFG.Model.Domain.Article
>()
.Name("articlesGrid")
.Columns(columns =>
{
columns.Bound(o => o.ID);
columns.Bound(o => o.Description);
columns.Bound(o => o.ProductLine);
columns.Bound(o => o.Age);
columns.Bound(o => o.Approval);
columns.Bound(o => o.Stockpile);
columns.Bound(o => o.Ordered);
columns.Bound(o => o.Certificate);
columns.Bound(o => o.ArtNr);
})
.Pageable()
.Sortable()
.Scrollable()
.Selectable()
.DataSource(dataSource => dataSource
.Server()
.PageSize(LFG.Web.Constants.GridPageSize)
.Model(model =>
{
model.Id(p => p.ID);
})
)
)
function onRowSelect(e) {
var row = this.select();
var id = row[0].childNodes[0].textContent;
console.log("RowSelect - ID: " + id);
var grid = $("#articlesGrid");
if (grid) {
grid.kendoGrid({
dataSource: {
type: "json",
transport: {
read: "/Shared/GetArticlesByGroup?id=" + id
}
}
});
grid.data("kendoGrid").dataSource.read();
}
}
$(
'#business-grid'
).kendoGrid({
dataSource: that._businessDatasource,
autoBind:
false
,
sortable:
true
,
selectable:
"row"
,
navigatable:
true
,
pageable: {
refresh:
true
,
pageSizes: [5, 10, 15, 20],
messages: {
display:
"{0} - {1} van {2} bedrijven"
,
itemsPerPage:
"bedrijven per pagina"
}
}
}