or
var localDataSource = new kendo.data.DataSource({ data: skills, schema: { model: { fields: { CatId: { type: "number" }, SkillCat: { type: "string" }, Skill: { type: "string" }, IsCorrect: { type: "string" } } } } }); var grid = $("#grid").kendoGrid({ dataSource: localDataSource, columns: [ { field: "Skill" }, { field: "IsCorrect" } ], height: 470, pageable: true, scrollable: true, dataBound: function () { localDataSource.group({ field: "CatId" }); grid.collapseGroup(grid.tbody.find(">tr.k-grouping-row:first")); for (i = 1; i <= 6; i++) { grid.collapseGroup(grid.tbody.find(">tr.k-grouping-row").eq(i)); }; } });
I really want to know if it is (or shortly will be?) possible to create multiple windows and charts on a page, without having to embed other pages (which would seem the HTML5 way of doing things).
If it is - how do I do it?
Currently the best I've got is:-
<script type="text/javascript"> $("#window").kendoWindow({ draggable: true, resizable: true, width: "480px", height: "300px", title: "Discharges", content: "http://findev1/WCF/dischargeswidget.htm", modal: false, actions: [ "Close"] }); $("#window2").kendoWindow({ draggable: true, resizable: true, width: "480px", height: "300px", title: "Admissions", content: "http://findev1/WCF/AdmissionsWidget.htm", modal: false, actions: ["Close"] });</script>
Which still has issues.
Thanks
<script type="text/javascript"> $(document).ready(function() { var template = kendo.template($("#template").html()); var dataSource = new kendo.data.DataSource({ transport: { read: { dataType: "jsonp", } }, schema: { data: "" } }); dataSource.read(); }); </script>HTTP/1.1 200 OKCache-Control: privateContent-Length: 748Content-Type: application/json; charset=utf-8Server: Microsoft-IIS/7.5X-AspNet-Version: 4.0.30319X-Powered-By: ASP.NETAccess-Control-Allow-Origin: *Date: Wed, 07 Dec 2011 16:28:04 GMT[{"EventID":"HL111213","InhomeDate":"12\/13\/2011 12:00:00 AM"},{"EventID":"HL120117","InhomeDate":"1\/17\/2012 12:00:00 AM"},{"EventID":"HL120214","InhomeDate":"2\/14\/2012 12:00:00 AM"},{"EventID":"HL120313","InhomeDate":"3\/13\/2012 12:00:00 AM"},{"EventID":"HL120410","InhomeDate":"4\/10\/2012 12:00:00 AM"},{"EventID":"HL120515","InhomeDate":"5\/15\/2012 12:00:00 AM"},{"EventID":"HL120612","InhomeDate":"6\/12\/2012 12:00:00 AM"},{"EventID":"HL120717","InhomeDate":"7\/17\/2012 12:00:00 AM"},{"EventID":"HL120814","InhomeDate":"8\/14\/2012 12:00:00 AM"},{"EventID":"HL120911","InhomeDate":"9\/11\/2012 12:00:00 AM"},{"EventID":"HL121016","InhomeDate":"10\/16\/2012 12:00:00 AM"},{"EventID":"HL121113","InhomeDate":"11\/13\/2012 12:00:00 AM"}]<script id="template" type="text/x-kendo-template"> <div class="tweet k-header"> #= EventID # </div> </script><html> <head> <!-- ========== JQuery + Kendo ========== --> <script type="text/javascript" src="../js/jQuery/jquery-1.6.2.min.js"></script> <script type="text/javascript" src="../js/Kendo/kendo.all.min.js"></script> <link rel="stylesheet" href="../css/Kendo/kendo.silver.min.css" /> <link rel="stylesheet" href="../css/Kendo/kendo.common.min.css" />
<script type="text/javascript" src="../js/test2.js"></script> </head> <body> <div id="grid" style="height: 700px; background-color: gray;"> <table id="tab"> <tr> <th data-field="FirstName">First Name</th> <th data-field="LastName">Last Name</th> </tr> </table> </div> </body></html>$(document).ready(function(){ var ds = new kendo.data.DataSource({ transport: { read: { url: "users.json" } } }); $("#tab").kendoGrid({ dataSource: ds });});{ "FirstName" : "Mirko", "LastName" : "Mitrovic", "FirstName" : "Marko", "LastName" : "Nikolic"}