This is a migrated thread and some comments may be shown as answers.

Appbuilder Json Error

1 Answer 58 Views
Show your code
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Paul
Top achievements
Rank 1
Paul asked on 04 May 2014, 02:26 PM
Hi, I am trying to get information out from Telerik's Backend. We are trying to pull out a timetable list from the Backend, and creating a list. Can anyone see where I am going wrong?

<div class="eventsLayout">
<h3>#:Event#</h3>
<p>Time: #:kendo.toString(Start_Time, "E")# - #:kendo.toString(End_Time, "E")#</p>
<p>Room: #:kendo.toString(Room, "E")#</p>
</div>
 
<script>
function mobileListViewPressToLoadMore() {

var tdataSource = new kendo.data.DataSource({
transport: {
data:"odata",
read: {
url: "http://api.everlive.com/v1/DsdZIJppozhafPu5/Events",
dataType: "json"
}
}

});

alert("");
alert(tdataSource);
alert(tdataSource.toString());
}
</script>

1 Answer, 1 is accepted

Sort by
0
Anton Dobrev
Telerik team
answered on 06 May 2014, 09:50 AM
Hi Paul,

Please, refer to this simplified sample of your code in JSBin. Basically, we have made some slight modifications to your code in order to configure properly the data source and the template for each list entry:
  • Create a kendo template for visualizing each entry (instead of a div element).
  • Configure the template to use as end time the "End_TIme" property as it is set in the server entities (notice the capitalization of the 'i').
  • Configure the template to format the date time as shown in the Kendo documentation.
  • Configure the data source to obtain the array with the needed data  from the "Result" field in the server response.
  • Initialize and bind the remote view.

In addition, you can use for your convenience and faster configuration the "Everlive" dialect of the Kendo data source when working with Backend Services content types.

Please, let us know if this works for you.

Regards,
Anton Dobrev
Telerik
 
Everlive is now Telerik Backend Services, and is part of the Telerik Platform.
 
Tags
Show your code
Asked by
Paul
Top achievements
Rank 1
Answers by
Anton Dobrev
Telerik team
Share this question
or