click: function(e) - Selected ITEM: e.dataItem is NOT defined

2 posts, 1 answers
  1. jstott
    jstott avatar
    6 posts
    Member since:
    Jan 2008

    Posted 28 Dec 2012 Link to this post

    Using 'kendoMobileListView' with endlessScroll: true

    Only the LAST page of fetched items have their 'dataItem' objects defined.

    Run the fiddle - note console.log of dataItem when taped.
    Scroll to fetch next page of items.  
    Note that the first page of items no longer have their dataItem(s) defined (when tapped) and only the new page of items do (as expected).

  2. Answer
    Alexander Valchev
    Alexander Valchev avatar
    2887 posts

    Posted 02 Jan 2013 Link to this post

    Hi Jim,

    Actually the behaviour that you described is expected by design. When server paging is enabled the DataSource keeps only the records from the last fetched page which is why the dataItem for all previous pages is undefined.

    If you need to store some information about the records from the previous pages I suggest you to do that via data-attributes in the mark-up.

    Kind regards,
    Alexander Valchev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top