or
<
div
id
=
"prodReportGrid"
data-bind
=
"source:ProductionReports"
>
</
div
>
$("#prodReportGrid").kendoGrid({
dataSource: {
pageSize: 50,
schema: {
model: {
id: "ProductionReportId",
fields: {
ProductionReportId: { editable: false, nullable: true },
ReportDateFrom: { type: "date", validation: { required: true } },
ReportDateTo: { type: "date", validation: { required: true } },
ProdAmount: { type: "number", validation: { required: true, min: 1} }
}
}
}
},
pageable: true,
sortable: true,
height: 350,
toolbar: ["create"],
columns: [
{ field: "ReportDateFrom", width: "100px", format: "{0:g}", editor: DateTimeEditor },
{ field: "ReportDateTo", width: "100px", format: "{0:g}", editor: DateTimeEditor },
{ field: "ProdAmount", title: "ProductionAmount", format: "{0:n}", width: "100px" },
{ command: ["edit", "destroy"], title: " ", width: "210px" }],
editable: "inline"
});
});