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

data-show && Cannot read property 'e.dataItem.foo' of undefined

0 Answers 125 Views
ListView (Mobile)
This is a migrated thread and some comments may be shown as answers.
Juan Carlos
Top achievements
Rank 1
Juan Carlos asked on 09 Nov 2012, 07:38 PM
Hi, 
The scenario is a div container with data-show="functionW" 
In this function I make a request to the server with some parameters from a previous view and result is shown as a  listview.
$("#listview").kendoMobileListView({
dataSource : dataSource,
click: function(e) {
alert(e.dataItem.foo);
}
});

Fist time everythink works fine, but when the listview is refreshed, the listview show correcty but click function show this error on console: Uncaught TypeError: Cannot read property 'foo' of undefined
The listView changes with some parameters, so I cant use data-init instead of data-show.
I have tried with data-click="functionW" from button of the previous form and same behaviour. 
 Anyone can light me??

No answers yet. Maybe you can help?

Tags
ListView (Mobile)
Asked by
Juan Carlos
Top achievements
Rank 1
Share this question
or