or
[{ Name: "Program 1", selectedClient: null, clients: clients}, { Name: "Program 2", selectedClient: null, clients: clients}, { Name: "Program 3", selectedClient: null, clients: clients}]<div id="tabStrip" data-role="tabstrip" data-bind="source: myModel" data-text-field="Name"data-content-field="myTemplate"> </div><script type="text/x-kendo-template" id="myTemplate"> <div> <div class="window-row"> <div class="form-label">Client:</div> <div id="clientDropDown" data-role="combobox" data-filter="contains" data-bind="value: selectedClient, source: clients" data-text-field="Name" data-value-field="Id" data-min-length="3" /> </div> </div></script>
@(Html.Kendo().MultiSelect().Name("BaPaymentMachine").Placeholder("Please choose BA").DataTextField("Id").DataValueField("Id").DataSource(ds => ds.Read("GetAllBaPayment", "Report")).HtmlAttributes(new { @style = "width:200px;" }))public class SearchViewModel{ public List<string> BaPaymentMachine { get; set; }}[HttpGet][OutputCache(Duration = 0)]public ActionResult _GetReportPartial(SearchViewModel model){ do stuff to model return PartialView(model);}var ba = $("#BaPaymentMachine").val(); alert("ba:" + ba); $.ajax({ type: "GET", url: '@Url.Action("_GetReportPartial", "Report")', data: { BaPaymentMachine: ba }, cache: false, success: function (data) { var newBox = "<div id='reportmap' class='width:100%'>" + data + "</div>"; $("#result").html(newBox); $(".loaderrepport").fadeOut("slow"); }, error: function () { showerror("There was a problem getting the values, please try again."); $(".loaderrepport").fadeOut("slow"); } }); });var chart = $("#SalesChart").data("kendoChart");chart.refresh({ data: { "FromDate": $("#FromDate").data("kendoDatePicker").value(), "ToDate": $("#ToDate").data("kendoDatePicker").value() }});Function GetSalesByDate(salesByDate As BO.Models.Statistics.SalesByDate) As JsonResult Return Json(BO.Factory.Statistics.GetSalesByDateData(BO.Factory.Statistics.GetSalesByDate)) End Function@code Dim SalesChart As Kendo.Mvc.UI.Chart(Of BO.Models.Statistics.SalesTimeSpan) = _ Html.Kendo.Chart(Of BO.Models.Statistics.SalesTimeSpan).Legend(False). Name("SalesChart").Title("Units sold").Series(Sub(series) series.Line(Function(model) model.Value, categoryExpression:=Function(model) model.Period). Aggregate(ChartSeriesAggregate.Avg) End Sub). CategoryAxis(Function(axis) axis.Date().BaseUnit(ChartAxisBaseUnit.Days)). DataSource(Function(ds) ds.Read(Function(read) read.Action("getsalesbydate", "statistics", New With {.area = String.Empty}))) SalesChart.Render() End Codevar list = [];$.post('get_all_teaor', function(data){ $.each($.parseJSON(data), function() { list.push("(" + String(this.id) + ") " + String(this.teaor_name) + "|"); });});$("#business_branch").focus(function() { $(".foo").html(list); console.log(typeof(list)); console.log(list.length); $('#business_branch').kendoAutoComplete({ dataSource: list, placeholder: "Kérem várjon ..." });});
$(document).ready(function () { $("#ordersGrid").kendoGrid({ pageable: true, sortable: true, detailTemplate: kendo.template($("#template").html()), detailInit: detailInit, dataBound: function () { this.expandRow(this.tbody.find("tr.k-master-row").first()); }, columns: [ { field: "shopOrderHexID", title: "ID", }, { field: "characterName", title: "Pilot" }, { field: "CreatedDate", title: "Created", format: "{0:yyyy.MM.dd}" }, { field: "LastModifiedDate", title: "Last Modified", format: "{0:yyyy.MM.dd}" }], dataSource: { transport: { read: "/ShopOrders/OrderList", dataType: "json", type: "POST", contentType: "application/json; charset=utf-8", data: {} }, parameterMap: function (options) { return JSON.stringify(options); }, schema: { model: { fields: { shopOrderHexID: { type: "string" }, characterName: { type: "string" }, characterID: { type: "number" }, CreatedDate: { type: "date" }, LastModifiedDate: { type: "date" } } }, data: "Data", total: "Total" }, pageSize: 5, serverPaging: true, serverSorting: true, serverFiltering: true } });});// returns a list of products in a specific category for the active userpublic JsonResult OrderList([Kendo.Mvc.UI.DataSourceRequest]Kendo.Mvc.UI.DataSourceRequest request){ var userID = User.Identity.GetUserId(); // build results, make sure to return only orders from current user var orders = repository.shopOrders .Where(order => order.userID == userID) // avoid circular reference by converting to view model, and flatten the model .Select(e => new ShopOrderViewModel { shopOrderID = e.shopOrderID, characterName = e.characterName, characterID = e.characterID, CreatedDate = e.CreatedDate, LastModifiedDate = e.LastModifiedDate, totalCost = e.orderItems .Sum( o => o.quantity * o.price ), paymentAmount = ( e.shopOrderPaymentRecords.Count() > 0 )? e.shopOrderPaymentRecords.Sum(p => p.payment):0, //paid = (paymentAmount >= totalCost) }) // convert to list so I can manipulate the data a little easily .ToList(); // populate the hex value of the shopOrderID (linq to objects/sql doesn't like doing this directly) for (int i = 0; i < orders.Count(); i++) { orders.ElementAt(i).shopOrderHexID = orders.ElementAt(i).shopOrderID.ToString("X8"); } // apply filter to the results... that's what this does right? Kendo.Mvc.UI.DataSourceResult result = orders.ToDataSourceResult(request); // return data as json return Json(result, JsonRequestBehavior.AllowGet);}