or
@model ISPIS.Models.TerenskiRezultatFK@section headCultureContent { <script src="@Url.Content("~/Scripts/kendo.culture.sr-Latn-RS.min.js")"></script>} <script type="text/javascript"> //set culture of the Kendo UI kendo.culture("sr-Latn-RS");</script> @{ ViewBag.Title = "Create"; Culture = "sr-Latn-RS";}<div class="editor-label"> @Html.LabelFor(model => model.DatumOcitavanja)</div><div class="editor-field"> @(Html.Kendo().DateTimePicker() .Name("DatumOcitavanja") .Value(DateTime.Now) /*.Culture("sr-Latn-RS")*/ .Format("dd.MM.yyyy HH:mm") .HtmlAttributes(new { style = "width:220px" }) ) @Html.ValidationMessageFor(model => model.DatumOcitavanja)</div><script type="text/x-kendo-tmpl" id="template">
<div>
<dl>
<dt>Street</dt> <dd>${Address.Street}</dd>
<dt>City</dt> <dd>${Address.City}</dd>
</dl>
</div>
</script>
But this leads to JavaScript exceptions, saying that the property is undefined. How can I handle this? Any idea is welcome, but this really a serious problem with complex data models. I cannot reduce my viewmodel to only have primitive properties, that woud cause too much effort...[DisplayName("Vendor")]public int? VendorId { get; set; }[DisplayName("Category")]public int CategoryId { get; set; }@(Html.Kendo().AutoComplete().Name("Expense.VendorId") .DataTextField("VendorName") .Filter(FilterType.StartsWith) .Placeholder("Type in a Vendor...") .DataSource(dataSource => { dataSource.Read(read => read.Action("_GetVendors", "Expense")); }) )$('#grid').kendoValidator({ rules: { specialDate: function (input) { input.attr("data-specialDate-msg", "The date should be 2013-01-02"); return input.val() == '2013-01-02'; } }, messages: {specialDate: "The date should be 2013-01-02"}});