or
startpicker.setOptions({ format: "MMMM, yyyy", value: startPickerValue.getMonth(), month: { content: "<div style='background-color:#= data.date < ($('#startDatePicker').data('kendoDatePicker').max()) > ? 'cyan' : 'lightgray' #'>#=data.value#</div>" } });var app = angular.module('myApp', ["kendo.directives"]);
app.controller('MyController', function ($scope) {
$scope.gridOptions = {
// standard grid initialisation
}
var grid = $("#grid"); grid.on("dblclick", "tr.k-state-selected td", function () { var $this = $(this); grid.data("kendoGrid").editCell($this); $this.focusout(function(){ // for input elements that use widgets they will lose focus when the widget is rendered
// so we need to rebind the foucsout to the widget var $widget = $('.k-widget', $this); if ($widget.length == 0) { if(!$(".k-grid-edit-row input").hasClass("k-invalid")){ //console.log('focusout'); $("#grid").data("kendoGrid").closeCell(); } }else{ //console.log('widget editing'); $widget.focusout(function() { //console.log('widget focusout'); if(!$(".k-grid-edit-row input").hasClass("k-invalid")) { $("#grid").data("kendoGrid").closeCell(); $widget.off('focusout'); } }); } }); });
}<div id="grid" data-role="grid" data-sortable="true" data-editable="false"data-navigatable="true" data-resizable="true" data-reorderable="true"data-pageable="{numeric: true, buttonCount: 5, previousNext: true, info: true}" data-selectable="True"data-columns='[{"field": "LoadDisplayId", "title": "Load Id", "width": "80px"}, {"field": "BeginDate", "title": "Start Date", "width": "80px", "format": "{0:MM/dd/yyyy}"}, {"field": "EndDate", "title": "End Date", "width": "80px", "format": "{0:MM/dd/yyyy}"},{"field": "RouteName", "title": "Route Identifier", "width": "100px"},{"field": "Origin", "title": "Origin", "width": "200px"},{"field": "Destination", "title": "Destination", "width": "200px"},{"field": "BillTo", "title": "BillTo", "width": "200px"},{"field": "Carrier", "title": "Carrier", "width": "200px"}]'data-bind="source: gridSource, events: { change: change }"></div>viewModel = kendo.observable({ gridSource: new kendo.data.DataSource({ data:[ { LoadId: 125642, LoadDisplayId: "L138094", StatusId: 285, Status: "Pending", RouteName: "May200", Origin: "A Raymond Tinnerman Auto, INC ", Destination: "B L Downey Company Inc.", BillTo: "Behr Charleston", Carrier: "AAA Cooper", BeginDate: "04/01/2013", EndDate: "04/01/2013", NextActionDate: "04/01/2013", NextAction: "Ready To Tender", CheckCallException: false, TenderException: false, HasPendingCustomerRequest: null }, { LoadId: 125642, LoadDisplayId: "L100004", StatusId: 285, Status: "Pending", RouteName: "test", Origin: "A Raymond Tinnerman Auto, INC ", Destination: "B L Downey Company Inc.", BillTo: "Behr Charleston", Carrier: "AAA Cooper", BeginDate: "04/01/2013", EndDate: "04/01/2013", NextActionDate: "04/01/2013", NextAction: "Ready To Tender", CheckCallException: false, TenderException: false, HasPendingCustomerRequest: null } ] })});gridSource: [ { LoadId: 125642, LoadDisplayId: "L138094", StatusId: 285, Status: "Pending", RouteName: "May200", Origin: "A Raymond Tinnerman Auto, INC ", Destination: "B L Downey Company Inc.", BillTo: "Behr Charleston", Carrier: "AAA Cooper", BeginDate: "04/01/2013", EndDate: "04/01/2013", NextActionDate: "04/01/2013", NextAction: "Ready To Tender", CheckCallException: false, TenderException: false, HasPendingCustomerRequest: null }, { LoadId: 125642, LoadDisplayId: "L100004", StatusId: 285, Status: "Pending", RouteName: "test", Origin: "A Raymond Tinnerman Auto, INC ", Destination: "B L Downey Company Inc.", BillTo: "Behr Charleston", Carrier: "AAA Cooper", BeginDate: "04/01/2013", EndDate: "04/01/2013", NextActionDate: "04/01/2013", NextAction: "Ready To Tender", CheckCallException: false, TenderException: false, HasPendingCustomerRequest: null } ]<!DOCTYPE html><html><head> <title>Images</title> <meta charset="utf-8"> <script src="client/js/jquery-1.11.1.min.js"></script> <link href="client/style/kendo.common.min.css" rel="stylesheet"> <link href="client/style/kendo.metro.min.css" rel="stylesheet"> <link href="client/style/kendo.dataviz.min.css" rel="stylesheet" /> <link href="client/style/kendo.dataviz.metro.min.css" rel="stylesheet" /> <script src="client/js/kendo.all.min.js"></script></head>
<body> <a href='#' style='margin-left:10px;' onclick="start();">Start</a> <table class="orgaltdata"> <thead> <tr> <th>Сайт</th> <th>Производитель</th> <th>Название</th> <th>Код</th> <th>Цена</th> <th>Склад</th> <th>Кор</th> </tr> </thead> <tbody> <tr> <td>favorit-auto.ru</td> <td>J+P Group</td> <td>Датчик износа тормозных колодок задний</td> <td>1397300500</td> <td>47,90</td> <td>46</td> <td>12</td> </tr> </tbody> </table><script> function start() { $(".orgaltdata").kendoGrid ({ //height: 550, //sortable: true }); }</script> </body></html><!DOCTYPE html><html><head> <title></title> <meta charset="utf-8" /> <link href="kendo/styles/kendo.mobile.all.min.css" rel="stylesheet" /> <link href="styles/main.css" rel="stylesheet" /> <script src="cordova.js"></script> <script src="kendo/js/jquery.min.js"></script> <script src="kendo/js/kendo.mobile.min.js"></script> <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBu29iUhQeU6HuCPhv4cehlkdWaEn0H-5E&sensor=true"></script> <script src="scripts/app.js"></script></head><body id="body"> <div data-role="layout" data-id="main"> <div data-role="header"> <div data-role="navbar"> <span data-role="view-title"></span> <a data-role="button" href="#appDrawer" data-rel="drawer" data-align="left" data-icon="drawer-button"></a> </div> </div> <!-- application views will be rendered here --> </div> <!-- application drawer and contents --> <div data-role="drawer" id="appDrawer" style="width: 200px" data-title="Navigation" data-position="left" data-swipe-to-open="false"> <div data-role="header"> <div data-role="navbar"> <span data-role="view-title"></span> </div> </div> <ul data-role="listview"> <li> <a href="views/home.html" data-icon="home">Home</a> </li> <li> <a href="views/map.html">Map</a> </li> <li> <a href="views/settings.html" data-icon="settings">Settings</a> </li> <li> <a href="views/contacts.html" data-icon="contacts">Contacts</a> </li> <li> <a href="views/business.html?businessId=3" data-icon="contacts">Business Test</a> </li> </ul> </div> </body></html><html><head></head><body><div id="businessDetail" data-role="view" data-title="Business Details" data-layout="main" data-model="APP.models.business" data-init="initBusinessDetails"> <!--<label for="Name">Name:</label><input id="name" data-bind="value: data.name" />--> <img style="float:left;width:50px;margin-right:5px;" data-bind="attr: { src: data.image_url }"> <div style="float:left;display:inline-block;"> <span data-bind="text: data.name"></span><br> <span data-bind="text: data.address1"></span><br> <span data-bind="text: data.city"></span>, <span data-bind="text: data.postal_code"></span> </div></div></body></html>