Hello,
I am trying to append some results pulled from my own endless scroll functionality (couldn't have the official endless scroll working the way I wanted, by basically calling my own js function, if this is doable I would be curious to know how).
I retrieve the results and sort it with js but I can't append it to my pre existing listview.
In the first function, I initialize the list view doing so:
$(
"#list-container"
).kendoMobileListView({
template : template,
dataSource: kendo.data.DataSource.create( { data:results, group:
"start"
} ),
fixedHeaders:
false
});
Then, when I retrieve some more results with the exact same structure, I'm trying to do this:
var
template = Handlebars.compile( $(
'#eventListTemplate'
).html() );
//Append the new results
var
newDataSource =
new
kendo.data.DataSource( { data:results, group:
"start"
} );
// console.log( newDataSource.data()[0] );
$(
"#list-container"
).data(
"kendoMobileListView"
).append([ newDataSource.data() ]);
just like in the documentation ( http://docs.telerik.com/kendo-ui/api/mobile/listview#methods-append ) I'm trying to append [ newDataSource.data()[0] ] but I've tried to append results directly or other kendo Data without any luck unfortunately.
Could you give me a hand on this matter please ?
Here is the results data structure:
results: [{id:1242, name:Redwoods & Wine Country Escape Tour, type:Music,…},…]
0: {id:1242, name:Redwoods & Wine Country Escape Tour, type:Music,…}
1: {id:1177, name:Peter Cincotti, type:Music,…}
2: {id:1183, name:Combichrist, type:Music,…}
3: {id:1179, name:The Suit, type:Music,…}
4: {id:1184, name:Matt Andersen, type:Music,…}
5: {id:1174, name:San Francisco Symphony: Tchaikovsky's Pathetique, type:Music,…}
6: {id:1182, name:Joel Gion & The Primary Colours (Brian Jonestown Massacre), type:Music,…}
7: {id:1175, name:Shlohmo, type:Music,…}
8: {id:1185, name:Jim Jones Revue, type:Music,…}
9: {id:1241, name:North Beach Food, type:Music,…}
10: {id:1180, name:Les Nubians @ 8pm, type:Music,…}
11: {id:1181, name:Les Nubians @ 10pm, type:Music,…}
12: {id:1186, name:Juana Molina, type:Music,…}
13: {id:1187, name:Sweet Thunder: Jack Quartet, type:Music,…}
14: {id:1178, name:The String Cheese Incident, type:Music,…}
15: {id:1189, name:David Gray, type:Music,…}
16: {id:1240, name:Big Bang Gala, type:Music,…}
Many Thanks