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

1 posts, 0 answers
  1. Juan Carlos
    Juan Carlos avatar
    8 posts
    Member since:
    Oct 2012

    Posted 09 Nov 2012 Link to this post

    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??
Back to Top