or
HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.//Other CRUD omitted for brevity [HttpPost] public ActionResult CreateProducts([DataSourceRequest]DataSourceRequest request, [Bind(Prefix = "models")]IEnumerable<Models.ItemModel> itemsToAdd) { Models.ShipmentModel shipmentModel = SessionModel; foreach (Models.ItemModel newItem in itemsToAdd) { if (shipmentModel.ItemModelList.Count > 0) { var nextID = (from i in shipmentModel.ItemModelList select i.ItemID).Max() + 1; newItem.ItemID = nextID; } shipmentModel.ItemModelList.Add(newItem); } var items = shipmentModel.ItemModelList; DataSourceResult result = items.ToDataSourceResult(request); return Json(result, JsonRequestBehavior.AllowGet); }<div id="ShipmentForm">@(Html.Kendo().Grid<KendoUITestEnvironment.Models.ItemModel>() .Name("QuoteItemGrid") .Columns(columns => { columns.Bound(i => i.FreightClass).Width(50); columns.Bound(i => i.Length).Width(50); columns.Bound(i => i.Width).Width(50); columns.Bound(i => i.Height).Width(50); columns.Bound(i => i.DimensionUnitOfMeasure).Width(50); columns.Bound(i => i.QuantityValue).Width(50); columns.Bound(i => i.QuantityUnitOfMeasure).Width(50); columns.Bound(i => i.Weight).Width(50); columns.Bound(i => i.WeightUnitOfMeasure).Width(50); columns.Bound(i => i.NmfcCode).Width(50); columns.Bound(i => i.ItemDescription).Width(50); columns.Command(command => command.Destroy()).Width(110); }) .ToolBar(toolbar => { toolbar.Create(); toolbar.Save(); }) .Editable(editable => editable.Mode(GridEditMode.InCell)) .Pageable() .Sortable() .Scrollable() .DataSource(dataSource => dataSource .Ajax() .Batch(true) .ServerOperation(false) .Events(events => events.Error("QuoteItemGrid_ErrorHandler")) .Model(model => { model.Id(i => i.ItemID); model.Field(i => i.FreightClass); }) .Create(create => create.Action("CreateProducts", "Home")) .Read(read => read.Action("GetProducts", "Home")) .Update(update => update.Action("UpdateProducts", "Home")) .Destroy(destroy => destroy.Action("DeleteProducts", "Home")) ))</div><span class="k-select"> <span unselectable="on" class="k-link"> <span unselectable="on" class="k-icon k-i-arrow-n" title="Increase value">Increase value</span> </span> <span unselectable="on" class="k-link"> <span unselectable="on" class="k-icon k-i-arrow-s" title="Decrease value">Decrease value</span> </span></span>function refreshKendoGrid(gridId) {
var grid = $(gridId).data("kendoGrid");
//reload grid's datasource
grid.dataSource.read();
// refreshes the grid
grid.refresh();
}
[code]
<div id="grid"></div><script type="text/javascript"> $(document).ready(function () { kendo.culture("ru-RU"); var dataSource = new kendo.data.DataSource({ transport: { read: { url: "http://localhost:6356/admin/GetUnitTogglesList" }, update: { url: "http://localhost:6356/admin/UpdateUnitToggles" }, destroy: { url: "http://localhost:6356/admin/DeleteUnitToggles" }, create: { url: "http://localhost:6356/admin/CreateUnitToggle" } }, batch: true, schema: { model: { fields: { Date: { type: "date" }, UnitId: { type: "number" }, Connect: { type: "boolean" } } } } }); dataSource.read(); $("#grid").kendoGrid({ dataSource: dataSource, navigatable: true, pageable: false, sortable: true, toolbar: ["create", "save", "cancel"], columns: [ { field: "Date", title: "Date", template: '#= kendo.toString(Date, "dd.MM.yyyy H:mm") #', editor: timeEditor }, { field: "UnitId", title: "Unit" }, { field: "Connect", title: "Status" } ], editable: true }); }); function timeEditor(container, options) { $('<input name="' + options.field + '"/>') .appendTo(container) .kendoDateTimePicker({ format: "dd.MM.yyyy H:mm", timeFormat: "H:mm" }); }</script>