kendo-ui

How to bind JSON child array to Kendo grid

ε祈祈猫儿з 提交于 2020-01-02 09:53:12
问题 Let´s say I have the following JSON data, which is the response data of an HTTP service call... { [ "container" : [ { "category" : "default", "items" : [ { "name" : "item-1" }, { "name" : "item-2" } ] } ] ] } I want to bind the items array to the Kendo UI Grid, so I defined the following data source... var dataSource = new kendo.data.DataSource({ transport: { read: { url: "http://...", dataType: "jsonp", data: { Accept: "application/json" } } }, schema: { model: ??? } }); I´ve absolutely no

get selected id of kendo drop down value

断了今生、忘了曾经 提交于 2020-01-02 08:49:53
问题 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. 回答1: In order to retrieve the selected Id you can

Customize the data in Kendo Grid pdf export

倾然丶 夕夏残阳落幕 提交于 2020-01-02 08:18:22
问题 I am using the built in functionality of Kendo Grid to export the grid data in pdf and excel http://demos.telerik.com/kendo-ui/grid/pdf-export. It is working fine for me. I want to customize the data that is exported i.e. add some additional columns and remove some of the columns of grid. Is there any way to customize the export data using templates or some other feature. Thanks in advance. 回答1: You have two options: Define a second grid with the columns that you want to export to PDF and

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

拟墨画扇 提交于 2020-01-02 08:11:50
问题 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

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

倖福魔咒の 提交于 2020-01-02 08:11:42
问题 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

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

被刻印的时光 ゝ 提交于 2020-01-02 07:45:23
问题 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

kendo UI grid dataitem set method

杀马特。学长 韩版系。学妹 提交于 2020-01-02 06:09:49
问题 grid.dataItem(selectedRow) this is return the selected row which is a kendo.data.ObservableObject. this object has all the columns for that grid's selected row. Is there a way to iterate thru all the columns and update. or do i have to do it like this: dataitem.set("Id", 1); dataitem.set("name", Eric); dataitem.set("age", 12); 回答1: As far as I understand what you are trying is to copy one JavaScript object into a Grid item, correct? Let's assume that you have the new value in val : var val =

kendo UI grid dataitem set method

帅比萌擦擦* 提交于 2020-01-02 06:07:26
问题 grid.dataItem(selectedRow) this is return the selected row which is a kendo.data.ObservableObject. this object has all the columns for that grid's selected row. Is there a way to iterate thru all the columns and update. or do i have to do it like this: dataitem.set("Id", 1); dataitem.set("name", Eric); dataitem.set("age", 12); 回答1: As far as I understand what you are trying is to copy one JavaScript object into a Grid item, correct? Let's assume that you have the new value in val : var val =

Kendo grid data export to a excel file

萝らか妹 提交于 2020-01-02 06:01:05
问题 I have configured the kendo grid and configured all the table rows and header.When I click export button it is generating an excel file.But where the problem occur I don't know with same configuration I have done in IE there instead of generating file it was showing the data format in URL with data:application/vnd.ms-excel,<table><tr><th>OrderID</th><th>Freight</th>..... var grid = $("#grid").kendoGrid({ dataSource: { type : "odata", transport : { read: "http://demos.kendoui.com/service

How to disable events in Kendo UI scheduler?I just to make it read only

筅森魡賤 提交于 2020-01-02 04:12:16
问题 How to disable the event in kendo UI scheduler?I study the example from the official website examples,and see all of the cell in event have double click event to create and delete and other events,but now I just use it to show the result,so how to prevent all the create,delete,edit events? 回答1: Use the editable configuration option: $("#scheduler").kendoScheduler({ date: new Date("2013/6/6"), dataSource: [ { start: new Date("2013/6/6 08:00 AM"), end: new Date("2013/6/6 09:00 AM"), title: