Files
upo-senior-assistant/SeniorAssistant/Views/Home/Users.cshtml
Giacomo Bertolazzi 20015159 1246116804 Besciamello (#1)
* Fixed login & auth
* Added dynamic breadcrumb
* Added DOC
* Added Patient
* Added Notifications
* Added Messages
* Refactoring api
* Re-writed menu
* Removed unused things
* Created README
2019-01-15 21:35:00 +01:00

47 lines
1.4 KiB
Plaintext

@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" }
},
serverPaging: false,
serverSorting: false,
batch: false,
schema: {
model: {
id: "username",
fields: {
username: { type: "string" },
name: { type: "string" },
lastName: { type: "string" }
}
}
}
},
scrollable: true,
sortable: true,
filterable: true,
editable: false,
columns: [
{ field: "name", title: "Name" },
{ field: "lastName", title: "Lastname" },
{ field: "url", title: "", template: '<a href=/user/#=username#>Vedi Dati</a>' }
/*,
{ field: "time", title: "Date/Time", format: "{dd/MM/yyyy HH}" },
{ field: "value", title: "Heartbeats" }
*/
]
});
})
</script>