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

Initializing mobile listview with virtual scrolling

1 Answer 180 Views
ListView (Mobile)
This is a migrated thread and some comments may be shown as answers.
Jeff
Top achievements
Rank 1
Jeff asked on 01 Apr 2014, 02:28 PM
When I try to initialize a mobile listview with virtual scrolling before I navigate to the parent data-view, I'm getting this error :

"03-31 22:56:56.872: E/Web Console(31538): Uncaught TypeError: Cannot call method 'makeVirtual' of null:46"

Here's my code:

lstJobs = $("#lstJobs").kendoMobileListView({
           dataSource: JobDataSource,
           template: $("#lstJobTemplate").html(),
           endlessScroll: true,
           virtualViewSize: 100 }).data("kendoMobileListView");

If I use serverPaging = true, pageSize=100 in the datasource for pre binding I don't get this error, but then performance is poor on some devices.

My use-case is that I have 3 different views with listviews on them, and I want them to load very quickly the first time the user accesses them.  So what I'm trying to do is pre-bind the listviews when the user first logs in, before they navigate to those screens.

Any ideas on this?

  Nick

1 Answer, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 03 Apr 2014, 07:13 AM
Hi Nick,

The virtualViewSize property is used when you want to create a Kendo UI Mobile ListView that uses local data and endless scrolling. Please note that if you set virtualViewSize you need to remove the pageSize property or any server bindings (because the ListView will operate using local data). I have created an example with Kendo UI Mobile ListView and local data virtualization, that you can use as a baseline and see the core functionality:

http://jsbin.com/dawalahu/1/edit

Regards,
Kiril Nikolov
Telerik
 
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
Jeff
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Share this question
or