or
@(Html.Kendo().Chart<InfoSource.Requests.Models.Graph>() .Name("myallocation") .Title(title => title .Text("MY ALLOCATION") .Font("16px Oswald") ) .Theme("Silver") .Legend(legend => legend .Visible(false) ) .ChartArea(chartArea => chartArea .Background("transparent") ) .DataSource(ds => ds .Read(read => read.Action("dMyAllocation", "Dashboard", new { area = "InfoSource.Metrics" })) ) .Series(series => { series.Pie(model => model.Value, model => model.Label, null, model => model.Label == "Unassigned" ? true : false) .Labels(labels => labels .Template("${dataItem.Label}") .Visible(true).Position(ChartPieLabelsPosition.InsideEnd) ); }) .Events(events => events .SeriesClick("myallocationClick") ) .Tooltip(tooltip => tooltip .Visible(true) .Template("${dataItem.Label} - ${value}%") ) .HtmlAttributes(new { style = "max-height: 300px;" }) )<div id="CustomerListPage" style="min-width: 500px"> <div style="width: 600px; margin-left: auto; margin-right: auto; text-align: right">Include Inactive?<input id="IncludeInactiveCheckBox" type="checkbox" data-bind="checked: includeInactive, events: {click: includeInactiveChanged}" /></div> <div id="CustomerListGrid" style="width: 600px; height:300px; margin-left: auto; margin-right: auto; margin-top: 10px" data-role="grid" data-selectable="row" data-columns='[{"field":"id", "title":"ID", "width":50}, {"field":"FullName", "title":"Name"}, {"field":"MailingAddressCity", "title":"City", "width":150}, {"field":"MailingAddressState", "title":"ST", "width":50}]' data-bind="source: customers"></div></div>var CustomerListViewModel = kendo.observable({ // properties customers: [], includeInactive: false, includeInactiveChanged: function (val) { this.load(); }, load: function () { var self = this; var dto = new DTO(true, '', new Object({ includeInactive: this.get("includeInactive") })); $.ajax('SysUserWebService.asmx/GetCustomerList', { data: JSON.stringify({ dto: dto }), type: 'post', contentType: 'application/json', success: function (result) { if (result.d.success) { self.set('customers', result.d.payload); } else { alert(result.d.message); }; } }); } });// routes the application based on hash changesvar HashChange = function () { HideAllPages(); var query = location.hash.split("?"); var hash = query[0]; switch (hash) { case '': location.hash = '#MainMenu'; break; case '#MainMenu': $('#MainMenuPage').show(); break; case '#CustomerList': $('#CustomerListPage').show(); kendo.bind($('#CustomerListPage'), window.CustomerListViewModel); window.CustomerListViewModel.load(); break; case '#CrewList': $('#CrewListPage').show(); break; case '#History': $('#HistoryPage').show(); break; };}; $("#window").kendoWindow({
actions: ["Custom", "Minimize", "Maximize", "Close"],
title: "Window Title"
}).data("kendoWindow").wrapper.find(".k-custom").click(function(e) {
alert("Custom action button clicked");
e.preventDefault();
});
function popStateHandler(e) { var State = e.state; if (State != null) { console.log(State); switch (State.stateTitle) { case "Landing Page": console.log('transitioning to landing page ...'); // show the content div and hide the hide the login panel // Transitions.PrimaryElementTransitions.HideLoginPanel(); break; default: break; } // end switch ... } else if (window.processingLogin == true) { console.log('Processing login flag is true.'); window.ProcessingLogin = false; } else { console.log('transitioning to login state ...'); // show the login panel and hide the content div // Transitions.PrimaryElementTransitions.ShowLoginPanel(); }}// Attach the window.history popstate event handler defined above.//window.addEventListener("popstate", popStateHandler, false); // end function definition and addEventListener method invocation ...Kendo Hello Friends Have a grid with inline editing and to 3 drop-down lists. The display and fill the drop-down lists ok. Works but if I want to save changes, so do not get the desired data to the controller? The list the values ​​I need are the IDs of the selected items from the drop! But come on, only the new text of the drop-down lists for the controller.
Here is my code and annexed the image on the controller
function loadTable() { var dataSource = new kendo.data.DataSource({ transport: { read: { url: "/Customer/LoadOperatingPictureTable", dataType: "json", type: "POST", contentType: "application/json; charset=utf-8", data: {} }, update: { url: "/Customer/UpdateAnimalValues", dataType: "json", type: "POST", contentType: "application/json; charset=utf-8" }, parameterMap: function (data, operation) { if (operation !== "read") { return JSON.stringify({ model: data }); } } }, autoSync: false, schema: { model: { id: "Id", fields: { Id: { editable: false, nullable: true }, Name: { editable: false }, AnimalCount: { type: "number", validation: { required: { message: "Das Feld darf nicht leer sein!" } } }, Distributor: { editable: true }, Label: { editable: true }, Marketer: { editable: true } } } }, error: function (e) { alert(e.status + ' ' + e.statusText); } }); $("div#operatingPictureTable").kendoGrid({ dataSource: dataSource, scrollable: true, sortable: true, editable: "inline", columns: [ { field: "Name", title: "Tierkategorie" }, { field: "AnimalCount", title: "Anzahl Tiere", template: '<div style="text-align: right">#= AnimalCount #</div>', width: 80 }, { field: "Distributor", title: "Lieferant", editor: onDrpDistributor }, { field: "Label", title: "Label", editor: onDrpLabel }, { field: "Marketer", title: "Vermarkter", editor: onDrpMarketer }, { command: "edit", titel: " ", width: 110 } ], }); function onDrpDistributor(container, options) { $('<input name="Distributors" data-bind="value:' + options.field + '"/>') .appendTo(container) .kendoDropDownList({ dataTextField: "Value", dataValueField: "Id", autoBind: false, dataSource: new kendo.data.DataSource({ transport: { read: { url: "/Main/GetDistributors", dataType: "json" }, schema: { model:{ id: "Id", value: "Value" } } } }) }); } function onDrpLabel(container, options) { $('<input name="Distributors" data-bind="value:' + options.field + '"/>') .appendTo(container) .kendoDropDownList({ dataTextField: "Value", dataValueField: "Id", autoBind: false, dataSource: { type: "json", transport: { read: "/Main/GetLabels" } } }); } function onDrpMarketer(container, options) { $('<input name="Distributors" data-bind="value:' + options.field + '"/>') .appendTo(container) .kendoDropDownList({ dataTextField: "Value", dataValueField: "Id", autoBind: false, dataSource: { type: "json", transport: { read: "/Main/GetMarketers" } } }); }}