kendo-ui

How to make a Pie Chart Aggregate the Data Source?

二次信任 提交于 2019-12-06 02:53:40
问题 Using Kendo UI Complete for ASP.NET MVC, version: 2013.3 1119 (Nov 20, 2013)... If I have this bit of code: $("#status-chart").kendoChart({ dataSource: { data: [ {Status: 10}, {Status: 20}, {Status: 200}, {Status: 200} ] }, series: [{ field: 'Status', categoryField: "Status", aggregate: 'count' }] }); I get this chart: As you can see - Status 10 and 20 have got a value of 1 and Status 200 a value of 2. Great, but what I actually want is exactly the same thing in a pie chart (so, a chart with

Preventing editing a row in kendo grid?

与世无争的帅哥 提交于 2019-12-06 02:32:08
I am using kendo grid and while editing a row i am checking whther that row is editable or not.So how to make the selected row non editable if its not editable.I am doing the checking in edit function of grid. Code $("#grid").kendoGrid({ dataSource : ds, selectable : "multiple", sortable : true, filterable : false, reorderable: true, scrollable : false, toolbar : ["create"], columns: [ { field: "event", width: "120px", title: "Event Type"}, { field: "event_id", width: "120px", title: "Event ID"}, { field: "addr_no_or_type", width: "120px", title:"Address"}, { field: "event_rate", width: "100px

kendo uploader Cross domain issue in Web.Api

不打扰是莪最后的温柔 提交于 2019-12-06 01:52:53
i already enable the Cors in my WEB API project ! all other methods inside the API controller can access from the other project ! but kendo uploader request can not reach to the controller method $("#files").kendoUpload({ async: { xhrFields: { withCredentials: true }, saveUrl: 'http://localhost:23618/API/test/UploadAttachment', removeUrl: 'http://localhost:23618/API/test/RemoveAttachment', autoUpload: true }, upload: function (e) { e.data = { contactID: 5 }; }, error: onError }); error A wildcard '*' cannot be used in the 'Access-Control-Allow-Origin' header when the credentials flag is true.

Disable Kendo Autocomplete

Deadly 提交于 2019-12-06 01:23:01
I have this Kendo Autocomplete code: HTML: <input id="faceUsers" type="text" placeholder="Search..." data-role="autocomplete" autocomplete="off" role="textbox" aria-haspopup="true" aria-disabled="false" aria-readonly="false" aria-autocomplete="list" aria-busy="false"> JS: $("#faceUsers").kendoAutoComplete({ dataTextField: "name", dataValueField: "name", template: '<img src=\"${data.picture.data.url}\" class="imguser" />' + '<h4 class="autotext">${ data.name }</h4>', filter: "contains", minLength: 1, height: 370, dataSource: faceDataSource }); I have set properly my faceDataSource and it works

Dynamically enable/disable kendo datepicker with Knockout-Kendo.js

拜拜、爱过 提交于 2019-12-06 01:16:34
I'm trying to enable / disable a kendo datepicker based on the selected value of an select using Knockout-Kendo.js. The HTML: <select data-bind="value: test"> <option value="1">1</option> <option value="2">2</option> </select> <input data-bind="kendoDatePicker: {value: date, enabled: test() == 2}" /> The JS: ko.applyBindings({ date: ko.observable(), test: ko.observable(), }); The fiddle: http://jsfiddle.net/xTjqH/2/ It does initially disable the datepicker, but it wont enable it once "2" is selected. Based on the way that dependencies are tracked for the individual options in the kendo

28 seconds difference in DateTime column after exporting from Kendo Grid to Excel

孤街浪徒 提交于 2019-12-06 00:39:40
We have a few grids in our web application and we use Kendo for ASP.Net MVC. Some clients are reporting that dates are different when they export the grid data to Excel. As an example, the first row comes from the controller as { "SaleDate": "2018-05-30T00:00:00", "SaleDateAndTime": "2018-05-30T08:01:40.673" } . After exporting to excel, the corresponding cell values are: 05/29/2018 23:59:32 and 05/30/2018 08:01:12 , respectively. I tried exporting dates with different time values and the difference after exporting to excel is always of 28 seconds. This only happens on some clients (timezones

how to get selected value for Kendo DropDownList

穿精又带淫゛_ 提交于 2019-12-06 00:09:51
问题 I can't figure out how to determine which item is selected in the my kendo dropdownlist. My view defines it's model as: @model KendoApp.Models.SelectorViewModel The ViewModel is defined as: public class SelectorViewModel { //I want to set this to the selected item in the view //And use it to set the initial item in the DropDownList public int EncSelected { get; set; } //contains the list if items for the DropDownList //SelectionTypes contains an ID and Description public IEnumerable

get selected id of kendo drop down value

有些话、适合烂在心里 提交于 2019-12-05 22:58:42
how to get id of selected name from dropdown. whene select Apples then got id 1 and select Oranges then 2 . this is simple kendo dropdown example. <body> <input id="dropdownlist" /> <script> $("#dropdownlist").kendoDropDownList({ dataSource: [ { id: 1, name: "Apples" }, { id: 2, name: "Oranges" } ], dataTextField: "name", dataValueField: "id", index: 1, select: onSelect }); function onSelect(e) { console.log(e); }; </script> </body> thanks. In order to retrieve the selected Id you can use the dataItem object and access the id within it with change event: var dataItem = e.sender.dataItem(); $('

Error rendering data with Javascript / KendoUI autocomplete - Object #<Object> has no method 'slice' - how to resolve?

自闭症网瘾萝莉.ら 提交于 2019-12-05 22:45:34
问题 I am following the Using Kendo UI with MVC4 WebAPI OData and EF article. After installing KendoUI and making sure all references are set, I type in three characters, and get the following error: Uncaught TypeError: Object # has no method 'slice' Root of the Problem To save reading through the updates: Through debugging I found that the issue is that JS is expecting to parse an array, where it isn't available in the data - at the root. In the data hierarchy, it's one level in. Original Problem

Cancel the update in inline kendo grid delete the row

末鹿安然 提交于 2019-12-05 22:37:14
问题 I am using two kendo inline grid parent and child. child grid contains the list of products,when user select the products(multiple selection) from child grid and clicked to save button,it's inserted into an parent grid. Child grid: var selectedIds = {}; var ctlGrid = $("#KendoWebDataGrid3"); ctlGrid.kendoGrid({ dataSource: { data:data1, schema: { model: { id: 'id', fields: { select: { type: "string", editable: false }, Qty: { editable: true, type: "number", validation: { min: 1, required: