or
@(Html.Kendo().Menu() .Name("grouplist") .HtmlAttributes(new { style = "width: 140px;" }) .Items(items => { foreach (ns.Models.GroupModel item in groups) { items.Add() .Text(item.Name) .HtmlAttributes(new { @class = "menuitem" }) //.HtmlAttributes(new { @title = "Items in this group : " + item.Count }) .Items(children => { children.Add().Text("Add new item"); children.Add().Text("Edit group"); children.Add().Text("Delete group!"); }); } }) .Orientation(MenuOrientation.Vertical))$("#ID_Comercial").addClass('mandatory');<input id="ID_Comercial" class="mandatory" type="text" style="width: 200px; display: none;" name="ID_Comercial" data-role="dropdownlist">$(function(){ that.element = $(element ? element : document.body); that._setupPlatform(); that._setupElementClass(); that._attachHideBarHandlers(); that.pane = new Pane(that.element, that.options); that._attachMeta(); if (that.options.updateDocumentTitle) { that._setupDocumentTitle(); } that._startHistory();});Uncaught TypeError: Cannot read property 'history' of undefined scripts/utils.js:54 redirect scripts/utils.js:541.<globalization culture="en-AU" uiCulture="en-AU" />01.public override object BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext)02. {03. 04. 05. var displayFormat = bindingContext.ModelMetadata.DisplayFormatString;06. var value = bindingContext.ValueProvider.GetValue(bindingContext.ModelName);07. 08. if (!string.IsNullOrEmpty(displayFormat) && value != null)09. {10. DateTime date;11. displayFormat = displayFormat.Replace("{0:", string.Empty).Replace("}", string.Empty);12. // use the format specified in the DisplayFormat attribute to parse the date13. 14. bindingContext.ModelState.SetModelValue(bindingContext.ModelName, bindingContext.ValueProvider.GetValue(bindingContext.ModelName));15. 16. if (DateTime.TryParseExact(value.AttemptedValue, displayFormat, CultureInfo.InvariantCulture, DateTimeStyles.None, out date))17. {18. return date;19. }20. else21. {22. bindingContext.ModelState.AddModelError(23. bindingContext.ModelName,24. string.Format("{0} is an invalid date format", value.AttemptedValue)25. );26. }27. }28. 29. return base.BindModel(controllerContext, bindingContext);30. }Html.Kendo().Grid(Model) .Name("grid") .Columns(columns => { columns.Bound(p => p.CaptureRequest.Title).HtmlAttributes(new { style = "cursor:pointer" }).Title(ContentProvider.Resources.Names.Name); columns.Bound(p => p.CaptureRequest.StartDate).Format("{0:dd.MM.yyyy}").Title(ContentProvider.Resources.Names.StartDate); columns.Bound(p => p.CaptureRequest.EndDate).Format("{0:dd.MM.yyyy}").Title(ContentProvider.Resources.Names.EndDate); })Html.Kendo().Grid(Model) .Name("grid") .Columns(columns => { columns.Bound(p => p.CaptureRequest.Title).HtmlAttributes(new { style = "cursor:pointer" }).Title(ContentProvider.Resources.Names.Name); columns.Bound(p => p.CaptureRequest.StartDate).Format("{0:dd.MM.yyyy}").Title(ContentProvider.Resources.Names.StartDate); columns.Bound(p => p.CaptureRequest.EndDate).Format("{0:dd.MM.yyyy}").Title(ContentProvider.Resources.Names.EndDate); columns.Command(command => command.Destroy()).Width(90); }).DataSource(dataSource => dataSource .Ajax() .PageSize(20) .Events(events => { events.Error("onGridError"); events.RequestEnd("onGridRequestEnd"); }) .Model(model => { model.Id(p => p.CaptureRequest.ID); }) .Read(read => read.Action("RequestGridSource/" + @ViewBag.id, "TstvOperation")) .Destroy(update => update.Action("DeleteActiveCaptureRequest", "TstvOperation")) )$(document.body).kendoTouch({ enableSwipe: true, minXDelta: 20, swipe: function(e) { console.log("swipe " + e.direction); alert("swipe " + e.direction); if(e.direction == "right") { if(app.pane.history.length > 1){ app.navigate("#:back"); } } }
});