Initializing mobile listview with virtual scrolling

2 posts, 0 answers
  1. Jeff
    Jeff avatar
    31 posts
    Member since:
    Oct 2011

    Posted 01 Apr 2014 Link to this post

    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?

  2. Kiril Nikolov
    Kiril Nikolov avatar
    2596 posts

    Posted 03 Apr 2014 Link to this post

    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:

    Kiril Nikolov
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top