I am facing two different problems when pressing the export to PDF button external to the Kendo Grid (We are using : kendo.web.min v2015.2.624 and pako_deflate.min 2015.2.624 to enable compression in the PDF - we are using local data)
1- The time it takes to export data to PDF is almost 10 times the excel export for the same set of data.
2- Firefox is giving the warning dialog box (attached) that the script is unresponsive.
thanks
Hello,
seems that if I have a resource with no records associated in datasource they are not displayed in the scheduler.
Am I right?
How can I solved it? I need them to be displayed.
Thanks in advance.
Hi, i can´t get this to work when I don´t use batch=true.
This works for batch creation (i copied it from one of your examples), please notice the marked as bold and italic code:
var dataSource = new kendo.data.DataSource({ transport: { read: function(options) { /* implementation omitted for brevity */ }, create: function(options) { // make JSONP request to http://demos.telerik.com/kendo-ui/service/products/create $.ajax({ dataType: "jsonp", // "jsonp" is required for cross-domain requests; use "json" for same-domain requests // send the created data items as the "models" service parameter encoded in JSON data: { models: kendo.stringify(options.data.models) }, success: function(result) { // result is an array containing the recently created item
options.success(result); }, error: function(result) { // notify the data source that the request failed options.error(result); } }); } }, batch: true, schema: { model: { id: "ProductID" } }
I guess the only difference should be:
var dataSource = new kendo.data.DataSource({ transport: { read: function(options) { /* implementation omitted for brevity */ }, create: function(options) { // make JSONP request to http://demos.telerik.com/kendo-ui/service/products/create $.ajax({ dataType: "jsonp", // "jsonp" is required for cross-domain requests; use "json" for same-domain requests // send the created data items as the "models" service parameter encoded in JSON data: {//Send a single object array, the webservice is expecting an array of objects, i first coded it so it would work mainly with batch=true models: kendo.stringify([options.data]) }, success: function(result) { //result is an array of objects. contains the recently created item options.success(result); }, error: function(result) { // notify the data source that the request failed options.error(result); } }); } }, batch: false, schema: { model: { id: "ProductID" } }
I tried sending and receiving an object instead an array of objects, but it didnt work either...
Thanks a lot for your help.
Hey guys,
perhaps a simple question, but i'm a little bit confused about this... How can i bind a remote datasource to a simple form. I know already which ID i want to use, but i don't know how to get the one specific ID and bind the Field to an input. In this case i open my page "http://myurl/form.php?id=618" and would like to fill out the whole form.
Thanks,
Chris
<form id="myForm"> <ul> <li> <input type="text" id="myField" class="k-textbox" data-bind="value:myField" /> </li> </ul></form><script>var dataSource = new kendo.data.DataSource({ transport: { read: { url: "http://myURL", dataType: "json", type: "GET", contentType: "application/json" } }, schema: { model: { id: "ID", fields: { ID: "ID", myField: "myField", } } }});</script>Hello to all,
I can't find if is possible to create a new event in the scheduler via drag.
Thanks in advance.
Hi,
I have grid with more than 100 records. I want to edit a record. so I have used filter or manually went to that page (say 5th page) and clicked edit or view. My edit and view buttons are custom buttons where it takes to another page. when i click save or cancel on edit or view pages, it will navigate to page where i have grid. The grid is by default selecting the first record. But i want to retain the filter or page number where the record is and should go to that page automatically. If it is in first page i am doing it on data bind, manually selecting the record and it is working fine. If the record is in the 5th page or so , I am selecting the record but the grid is going to default to first page.
function grid_dataBinding(e) { var grid = this; var count = 0; var value = $("#myDiv").data('value'); if (value > 0) { $.each(grid.tbody.find('tr'), function () { var model = grid.dataItem(this); if (model.id == value) {//some condition $('[data-uid=' + model.uid + ']').addClass('k-state-selected'); count++; return; } }); }// If i dont have any selected id, I am defaulting it to first record else { this.element.find('tbody tr:first').addClass('k-state-selected'); }// If i dont find the selected id in the grid am defaulting it to first record if (count == 0) this.element.find('tbody tr:first').addClass('k-state-selected');}Hi.
I am trying to build a kendo grid with a custom editor. My grid has 2 checkboxes that have custom designs. I was able to create a template to handle the custom checkboxes. However, I am having difficulty with having that same custom design working in the edit mode. I have posted below my code which includes how I intended the custom checkboxes to be built:
<div id="grid" class="settings-grid patient-settings" data-columns='[{title: "", width: "15px", attributes: {"class": "indent-cell"}}, {field: "select", title: "select", width: "40px", template: "#if (select) { # <div class=\"checkbox\"><label class=\"check-label\"><input type=\"checkbox\" name=\"check\" class=\"check\" checked=\"true\" disabled=\"true\"/> <span></span></label></div> # } else { # <div class=\"checkbox\"><label class=\"check-label\"><input type=\"checkbox\" name=\"check\" class=\"check\" disabled=\"true\"/> <span></span></label></div> # } #"}, {field: "description", title: "Description", attributes: {"class": "desc"}}, {field: "active", title: "Active", width: "63px", template: "# if (active) { # <span class=\"icon_check\"></span> # } #"}, {command: [ { name: "edit", text: {edit:"", update:"", cancel:""}}, {name: "destroy", text: "" }], title: "Actions", width: "15%"}]'> <script type="text/javascript">var dataSource = new kendo.data.DataSource({ data: [ { id: 1, select: 0, description: "Option text goes and so forth ...", active: 0 }, { id: 2, select: 1, description: "Option text goes right here and so forth ...", active: 1 }, { id: 3, select: 1, description: "Option text goes right here ...", active: 1 }, { id: 4, select: 1, description: "Option text goes here ...", active: 1 } ], pageSize: 7, schema: { model: { id: "id", fields: { select: { type: "boolean", editable: true, nullable: false }, description: { type: "string", editable: true , nullable: false }, active: { type: "boolean", editable: true , nullable: false } } } } }); // Create an observable object. var vm = kendo.observable({ settings: dataSource }); kendo.bind($("#grid"), vm);</script>