Hi
I am starting with Kendo UI. I have an exisiting OData Service at http://enservice.indiamvp.net/EventNetworkingService.svc/Cities that is based on Odata v3.
I am trying to display the cityname in a Mobile ListView. I have set up my datasource as follows:
var speakerData = new kendo.data.DataSource(
{
type: "odata",
transport: {
read: {
// the remote service url
url: "http://enservice.indiamvp.net/EventNetworkingService.svc/Cities",
dataType: "jsonp",
data: {
Accept: "application/json"
}
}
},
serverfiltering: false,
serverPaging: true,
pageSize: 10,
batch: false,
schema: {
data: "d",
model: {
id: "CityID",
fields: {
CityID: { type: "number" },
CityName: { type: "string" }
}
}
}
}
);
To initialise the ListView I am using the following:
$("#speakersView").kendoMobileListView(
{
template: "<strong>${speakerData.CityName}</strong><br/>",
dataSource: speakerData.read()
}
);
Both the functions are in <head> element and not in the $document.ready function. I am using data-init on the view. Checking from Chrome Dev Tools, I can see that the JSON data is downloaded.
However, nothing gets displayed on the ListView. Stepping through the JS i see that there is a exception getting generated: "speakerData is not defined" pointing to the fact the maybe the DataSource is not initialised properly.
Can someone recommend on what I could be doing incorrectly?
Thanks
Abhishek
I am starting with Kendo UI. I have an exisiting OData Service at http://enservice.indiamvp.net/EventNetworkingService.svc/Cities that is based on Odata v3.
I am trying to display the cityname in a Mobile ListView. I have set up my datasource as follows:
var speakerData = new kendo.data.DataSource(
{
type: "odata",
transport: {
read: {
// the remote service url
url: "http://enservice.indiamvp.net/EventNetworkingService.svc/Cities",
dataType: "jsonp",
data: {
Accept: "application/json"
}
}
},
serverfiltering: false,
serverPaging: true,
pageSize: 10,
batch: false,
schema: {
data: "d",
model: {
id: "CityID",
fields: {
CityID: { type: "number" },
CityName: { type: "string" }
}
}
}
}
);
To initialise the ListView I am using the following:
$("#speakersView").kendoMobileListView(
{
template: "<strong>${speakerData.CityName}</strong><br/>",
dataSource: speakerData.read()
}
);
Both the functions are in <head> element and not in the $document.ready function. I am using data-init on the view. Checking from Chrome Dev Tools, I can see that the JSON data is downloaded.
However, nothing gets displayed on the ListView. Stepping through the JS i see that there is a exception getting generated: "speakerData is not defined" pointing to the fact the maybe the DataSource is not initialised properly.
Can someone recommend on what I could be doing incorrectly?
Thanks
Abhishek