@model JoeysProofOfConcept.ClientGroupCustomPropertyViewModel
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Joeys Kendo UI Grid Proof of Concept</title>
<link href="https://da7xgjtj801h2.cloudfront.net/2012.3.1114/styles/kendo.common.min.css" rel="stylesheet" />
<link href="https://da7xgjtj801h2.cloudfront.net/2012.3.1114/styles/kendo.default.min.css" rel="stylesheet" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script src="https://da7xgjtj801h2.cloudfront.net/2012.3.1114/js/kendo.all.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
{ field: "FieldType", width: "150px" },
{ field: "Value", width: "150px" },
{ field: "IsRequired", width: "100px" },
{ command: "destroy", title: "Delete", width: "110px" }
editable: "popup", // enable editing
toolbar: ["create", "save", "cancel"], // specify toolbar commands
model: { // define the model of the data source. Required for validation and property types.
Id: { editable: false, nullable: true },
Name: { validation: { required: true } },
FieldType: { validation: { required: true } },
IsRequired: { type: "boolean" },
Value: { validation: { required: true } }
batch: true, // enable batch editing - changes will be saved when the user clicks the "Save changes" button
url: "@Url.Action("Create", "Home")", //specify the URL which should create new records. This is the Create method of the HomeController.
type: "POST" //use HTTP POST request as the default GET is not allowed for ASMX
url: "@Url.Action("Read", "Home")", //specify the URL which should return the records. This is the Read method of the HomeController.
contentType: "application/json",
type: "POST" //use HTTP POST request as by default GET is not allowed by ASP.NET MVC
url:"@Url.Action("Update", "Home")", //specify the URL which should update the records. This is the Update method of the HomeController.
type: "POST" //use HTTP POST request as by default GET is not allowed by ASP.NET MVC
url: "@Url.Action("Destroy", "Home")", //specify the URL which should destroy the records. This is the Destroy method of the HomeController.
type: "POST" //use HTTP POST request as by default GET is not allowed by ASP.NET MVC
parameterMap: function(data, operation) {
if (operation != "read") {
// post the products so the ASP.NET DefaultModelBinder will understand them:
for (var i = 0; i < data.models.length; i++) {
var results = data.models[i];
for (var member in results) {
result["model[" + i + "]." + member] = results[member];
return JSON.stringify(data);