Hi,
I am trying to create a Kendo Mobile ListView with infinite scrolling and a detail view.
When I select a list item the e.dataItem allows me to pass data to display on selected Item Detail view.
This works fine until the infinite scroll is triggered and loads in more list items...
The DataSource then appears to no longer contain the old items, and therefore e.dataItem is undefined.
I can't seem to find a method that works?
Thanks for your help,
David
// kendoMobileListView code snippet:
PS. It would also be nice to have some examples/demos showing infinite scroller and a detail view?
I am trying to create a Kendo Mobile ListView with infinite scrolling and a detail view.
When I select a list item the e.dataItem allows me to pass data to display on selected Item Detail view.
This works fine until the infinite scroll is triggered and loads in more list items...
The DataSource then appears to no longer contain the old items, and therefore e.dataItem is undefined.
I can't seem to find a method that works?
Thanks for your help,
David
// kendoMobileListView code snippet:
click: function(e){
if ( e.dataItem != undefined )
{
console.log("selected: " + e.dataItem.id);
viewModel = e.dataItem;
// bind to detail view
if ( viewModel != null )
{
// extend view model
viewModel.dateText = function(){ return kendo.toString(new Date(this.startDate),"ddd MMM yyyy h:mm tt"); }
kendo.bind( $("#viewMyEventItemDetail"), viewModel );
//app.navigate("#viewMyEventItemDetail");
}
}
}
if ( e.dataItem != undefined )
{
console.log("selected: " + e.dataItem.id);
viewModel = e.dataItem;
// bind to detail view
if ( viewModel != null )
{
// extend view model
viewModel.dateText = function(){ return kendo.toString(new Date(this.startDate),"ddd MMM yyyy h:mm tt"); }
kendo.bind( $("#viewMyEventItemDetail"), viewModel );
//app.navigate("#viewMyEventItemDetail");
}
}
}
PS. It would also be nice to have some examples/demos showing infinite scroller and a detail view?