or
01.var ctx = System.Web.HttpContext.Current.GetDataContext;02. 03.$jqInt("#to-country").kendoDropDownList({04. dataValueField: "id",05. dataTextField: "name",06. dataSource:$jqInt.merge([{ id:'', name:'Select Country'}], @Html.Raw(Json.Encode(ctx.AFCountries.Select(x => new { x.id, x.name })))),07. change: function(e){08. quote.set("toCountry", e.sender.value());09. $jqInt("#to-city").data("kendoDropDownList").dataSource.read();10. }11. });template: '<div style="float: left;">#: Name # </div><div style="float: right; width: 50px; text-align: right;"> #: Qty # </div><div style="float: right;"> #: kendo.toString(Cost, "c0") # </div>'template: '#: Name # #: Qty # #: kendo.toString(Cost, "c0") #'{ field: 'agenda', template: kendo.template($("#agendas-template").html()), title: "Agendas", filterable: true, sortable: false, groupable: false}<script id="agendas-template" type="text/x-kendo-tmpl"> # $.each(agenda, function(data) { if (typeof this.Name !== "undefined") {# <span><a href="/#: this.URLBase #/agenda/#: this.Id #">#: this.Name #</a></span> # } }); #</script>@(Html.Kendo().Grid<WebAreaGroupAccess>()<br> .Name("areaGroupAccess")<br> .Columns(col =><br> {<br> col.Bound(g => g.ActiveDirectoryGroupId).Title("Group").Width("30%").EditorTemplateName("ActiveDirectoryGroup").ClientTemplate("<a class='StandardHyperlink' href=/CPQ-IFO/Admin/Groups/${ActiveDirectoryGroupId}>${ActiveDirectoryGroupId}</a>");<br> col.Bound(g => g.Description).Title("Group Description").Width("30%");<br> col.Bound(g => g.AccessLevel).Title("Access Type").Width("20%").EditorTemplateName("AccessLevel").ClientTemplate("#= AccessLevel == 0 ? 'Read-Only' : 'Read/Write' #");<br> col.Command(command => { command.Destroy(); }).Width("20%").Hidden(!Model.PageDataModel.SaveEnabled);<br> })<br> .Editable(edit =><br> {<br> edit.Enabled(Model.PageDataModel.SaveEnabled);<br> edit.Mode(GridEditMode.InCell);<br> })<br> .ToolBar(toolbar => toolbar.Create())<br> .Events(e => e.Edit("onEdit").Save("onSave").Remove("setSaveRequired"))<br> .DataSource(ds => ds<br> .Ajax()<br> .Batch(true)<br> .ServerOperation(false)<br> .Read(read => read.Action("AreaGroup_List", "Area", new { AreaCode = Model.Area.WebAreaCode }))<br> .Create(update => update.Action("AreaGroup_Create", "Area"))<br> .Update(update => update.Action("AreaGroup_Update", "Area"))<br> .Destroy(update => update.Action("AreaGroup_Delete", "Area"))<br> .PageSize(10)<br> .Model(m =><br> {<br> m.Id(g => g.ActiveDirectoryGroupId);<br> m.Field(g => g.ActiveDirectoryGroupId).DefaultValue("LNA-ISOURCE_ACCOUNT_ADMIN");<br> m.Field(g => g.Description).Editable(false);<br> m.Field(g => g.AccessLevel);<br> m.Field(g => g.WebAreaCode);<br> })<br> .Events(e => e.Sync("onSync").Error("onError"))<br> )<br> )"editable":{"confirmation":"Are you sure you want to delete this record?","confirmDelete":"Delete","cancelDelete":"Cancel","mode":"incell","template":null,"create":true,"update":true,"destroy":true}$scope.addClientOptions = { index: -1, optionLabel: " ", highlightFirst: true, autoBind: true, filter: "contains", dataTextField: "name", dataValueField: "id", dataSource: { type: "json", serverFiltering: true, transport: { read: { url: "uni/party/client" } }, schema: { data: "data", total: function (result) { return result.total; } } } };$scope.addCompanyOptions = { optionLabel: " ", highlightFirst: true, autoBind: true, filter: "contains", dataTextField: "name", dataValueField: "id", cascadeFrom: "param_client", cascadeFromField: "id", dataSource: { type: "json", serverFiltering: true, transport: { read: { url: "uni/party/company" } }, schema: { data: "data", total: function (result) { return result.total; } } } };$scope.documenTypeAddOpions = { optionLabel: " ", autoBind: true, filter: "contains", dataTextField: "name", dataValueField: "id", cascadeFrom: "param_customer", cascadeFromField: "id", dataSource: { type: "json", serverFiltering: true, transport: { read: { url: "unisono/symfony/document/type" } }, schema: { data: "data", total: function (result) { return result.total; } } } };