or
01.
vm.SetLayers = function (values) {
02.
//this.LayerTable.data(values);
03.
//this.LayerTable.aggregate = [{ field: "FileCount", aggregate: "count" }];
04.
//this.trigger("change", { field: "LayerTable" });
05.
this.LayerTable = new kendo.data.DataSource({
06.
data: values,
07.
aggregate: [
08.
{ field: "FileCount", aggregate: "count" },
09.
{ field: "Size", aggregate: "sum" }
10.
]
11.
});
12.
this.trigger("change", { field: "LayerTable" });
13.
};
01.
var totalFiles = function () {
02.
return this.LayerTable.aggregates().FileCount.count;
03.
};
04.
var totalSize = function () {
05.
return this.LayerTable.aggregates().Size.sum;
06.
};
07.
vm = kendo.observable({
08.
InfoTable: infoTable,
09.
LayerTable: layerTable,
10.
StatsTable: statsTable,
11.
TotalFiles: totalFiles,
12.
TotalSize: totalSize
13.
});
01.
var infoTable = [
02.
{ Item: "Status", Value: "Initializing" },
03.
{ Item: "XHR2", Value: false },
04.
{ Item: "B64", Value: false },
05.
{ Item: "PouchDB", value: "" },
06.
{ Item: "Center", Value: "xx" },
07.
{ Item: "Date", Value: "xx" },
08.
{ Item: "Zoom", Value: 0 },
09.
{ Item: "Total Files", Value: 0 },
10.
{ Item: "Total Size", Value: 0 }
11.
12.
];
@(Html.Kendo().TreeView()
.Name(
"s-list-event-container"
)
.HtmlAttributes(
new
{ @
class
=
"s-list-container"
, style =
"color: white"
})
.Events(events => events
.Select(
"preventSelect"
)
)
.TemplateId(
"template-list-event"
)
.BindTo(Model.ToList(), mapping => mapping
.For<ArdentMC.Sentry.Data.Event>(binding => binding
.Children(e => e.EventObjects)
.ItemDataBound((item, e) =>
{
item.Id = e.EventID.ToString();
item.Text = e.Name;
// Here's where I'd like to add a description. The line below runs but appears to do nothing.
item.HtmlAttributes.Add(
"data-description"
, e.Description);
})
)
.For<ArdentMC.Sentry.Data.EventObject>(binding => binding
.Children(o => o.EventObjects)
.ItemDataBound((item, o) =>
{
item.Id = o.EventObjectID.ToString();
item.Text = o.Name;
})
)
)
)