Hello,
I try to use the ListView widget according to the documentation.
I created a list in my HTML as following:
<ul id="listView"></ul>
Then, I copy-pasted the example in the demo:
$("#listView").kendoListView({
dataSource: {
data: [{title: "Star Wars: A New Hope", year: "1977"}, {title: "Star Wars: The Empire Strikes Back", year: "1980"}]
},
template: "<li>${title} ${year}</li>"
});
But when I run it, the code in the browser looks like this:
as You can see, the template is empty for some reason...
I also noticed that in the examples the template is sometimes inside the dataSource property, like this:
dataSource: {
data: [{title: "Star Wars: A New Hope", year: "1977"}, {title: "Star Wars: The Empire Strikes Back", yearI : "1980"}],
template: "<li>${title} ${year}</li>"
}
And sometimes like in my first code example, I wonder what is the correct syntax?.. (I tried both.. Same result with the template)
I wonder what am I doing wrong?
Any help would be appreciated.
Thanks,
Irit.
I try to use the ListView widget according to the documentation.
I created a list in my HTML as following:
<ul id="listView"></ul>
Then, I copy-pasted the example in the demo:
$("#listView").kendoListView({
dataSource: {
data: [{title: "Star Wars: A New Hope", year: "1977"}, {title: "Star Wars: The Empire Strikes Back", year: "1980"}]
},
template: "<li>${title} ${year}</li>"
});
But when I run it, the code in the browser looks like this:
$("#listView").kendoListView({
dataSource: {
data: [{title: "Star Wars: A New Hope", year: "1977"}, {title: "Star Wars: The Empire Strikes Back", year: "1980"}]
},
template: "<li> </li>"
});
as You can see, the template is empty for some reason...
I also noticed that in the examples the template is sometimes inside the dataSource property, like this:
dataSource: {
data: [{title: "Star Wars: A New Hope", year: "1977"}, {title: "Star Wars: The Empire Strikes Back", yearI : "1980"}],
template: "<li>${title} ${year}</li>"
}
And sometimes like in my first code example, I wonder what is the correct syntax?.. (I tried both.. Same result with the template)
I wonder what am I doing wrong?
Any help would be appreciated.
Thanks,
Irit.