Init
- aggiunto un po di tutto comeil progetto del prof
This commit is contained in:
52
SeniorAssistant/Views/Home/Index.cshtml
Normal file
52
SeniorAssistant/Views/Home/Index.cshtml
Normal file
@@ -0,0 +1,52 @@
|
||||
@model IEnumerable<User>
|
||||
@{
|
||||
ViewBag.Title = "Hello Razor";
|
||||
}
|
||||
|
||||
<div id="grid"></div>
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
var baseUrl = "@Url.Content("~/api/user/")";
|
||||
|
||||
$("#grid").kendoGrid({
|
||||
dataSource: {
|
||||
transport: {
|
||||
read: { url: baseUrl, type: "GET" }
|
||||
|
||||
/*
|
||||
parameterMap: function (model, operation) {
|
||||
if (operation !== "read" && model) {
|
||||
return kendo.stringify(model);
|
||||
}
|
||||
}
|
||||
*/
|
||||
},
|
||||
serverPaging: false,
|
||||
serverSorting: false,
|
||||
batch: false,
|
||||
schema: {
|
||||
model: {
|
||||
id: "username",
|
||||
fields: {
|
||||
username: { type: "string" },
|
||||
name: { type: "string" }
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
scrollable: true,
|
||||
sortable: true,
|
||||
filterable: true,
|
||||
editable: false,
|
||||
columns: [
|
||||
{ field: "username", title: "Username" },
|
||||
{ field: "name", title: "Name" } /*,
|
||||
{ field: "time", title: "Date/Time", format: "{dd/MM/yyyy HH}" },
|
||||
{ field: "value", title: "Heartbeats" }
|
||||
*/
|
||||
]
|
||||
});
|
||||
})
|
||||
|
||||
</script>
|
||||
Reference in New Issue
Block a user