or
dsEventsList = new kendo.data.DataSource({ data: JSON.parse(localStorage.getItem("EventsJson")), filter: { field: "Events_ID", operator: "eq", value: g_Events_ID } }); //Total Record --> 23
alert(dsEventsList.options.data.length);<script type="text/javascript"> $(document).ready(function () { $("#reply").kendoEditor(); });</script><textarea id="reply" rows="10" cols="30" style="width:740px; height="440px"> This is a test to see if the script shows up is the editor. </textarea> <button> Save</button>$(document).ready(function() { var dataSource = new kendo.data.DataSource({ pageSize: 2, transport: { read: "dataSourceJson.php" }, schema: { data: "data" }, error: function(e) { // handle event alert("error"); }, change: function(e) { // handle event //alert("change"); } }); $("#grid").kendoGrid({ dataSource: dataSource, pageable: true, groupable: true, scrollable: true, sortable: true, pageable: true }); $("#search").click(function() { var Grid = $("#grid").data("kendoGrid"); var data = Grid.dataSource_data; dataSource.read(); }); });<?php$array = Array(Array("from_user" => "daniel","from_user_id" => "1"), Array("from_user" => "daniel","from_user_id" => "1"), Array("from_user" => "daniel","from_user_id" => "1"), Array("from_user" => "daniel","from_user_id" => "1"), Array("from_user" => "daniel","from_user_id" => "1"), Array("from_user" => "daniel","from_user_id" => "1"));header('Content-Type: application/json; charset=iso-8859-1');echo "{\"data\":" .json_encode($array). "}";?>$(document).ready(function () { function onChange() { $("#weather-container").html(kendo.render(template, this.view())); } // create a template using the above definition var template = kendo.template($("#dashwidget-weather-template").html()); var dataSource = new kendo.data.DataSource({ transport: { // specify the XML file to read. The same as read: { url: "books.xml" } read: { dateType: "xml" } }, schema: { // specify the the schema is XML type: "xml", // the XML element which represents a single data record data: "/weather/current_conditions", // define the model - the object which will represent a single data record model: { fields: { condition: "condition/text()", temp: "temp_c/text()" } } }, change: onChange }); dataSource.read();});