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

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

1 Answer 168 Views
ListView (Mobile)
This is a migrated thread and some comments may be shown as answers.
jstott
Top achievements
Rank 1
jstott asked on 28 Dec 2012, 06:43 PM
Using 'kendoMobileListView' with endlessScroll: true

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

http://jsfiddle.net/jmucci/LrQau/

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).





1 Answer, 1 is accepted

Sort by
0
Accepted
Alexander Valchev
Telerik team
answered on 02 Jan 2013, 02:41 PM
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!
Tags
ListView (Mobile)
Asked by
jstott
Top achievements
Rank 1
Answers by
Alexander Valchev
Telerik team
Share this question
or