I'm about to pull my hair out trying to get data to display. I've tried in a grid and now I'm just using a template, slightly modified from the Twitter example.
Here is my code:
(I replaced the server name with myserver.com).
This JSON service runs on our internal service and I can normally get it via a webclient, etc.
The Fiddler return data looks like this:
I modified the template to look like this:
But nothing ever shows up. Any help would be appreciated. Eventually, I'd like to have the data in a grid, but I'm trying to take baby steps first. Is there anything wrong with how my service is configured? Do I need to modify my transport?
Thanks
Troy
Here is my code:
<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>(I replaced the server name with myserver.com).
This JSON service runs on our internal service and I can normally get it via a webclient, etc.
The Fiddler return data looks like this:
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"}]I modified the template to look like this:
<script id="template" type="text/x-kendo-template"> <div class="tweet k-header"> #= EventID # </div> </script>But nothing ever shows up. Any help would be appreciated. Eventually, I'd like to have the data in a grid, but I'm trying to take baby steps first. Is there anything wrong with how my service is configured? Do I need to modify my transport?
Thanks
Troy