MobileListView - Endless Scrolling Issues - 2013.3.1119

5 posts, 0 answers
  1. Bill
    Bill avatar
    75 posts
    Member since:
    Feb 2013

    Posted 03 Mar 2014 Link to this post

    I have an issue where my list view:

    1) Does not display the appropriate number of items set for the page size.  It displays 1/2 of the set items.
    2) The loading twirly displays 100% of the time.
    3) When attempting to scroll the list view, sometimes the list view gets stuck further down the view that what it should.

    Are there any known issues that would be causing these problems with 2013.3.1119?

    I'm not doing anything special.  Here's the code:

    @(Html.Kendo().MobileListView<VINspinAppsMobile.Web.Areas.CRM.Models.Leads.SelectLeadListViewModel>()
        .Name("SelectLeadListView")
        .TemplateId("SelectLeadListViewTemplate")
        .EndlessScroll(true)
        .ScrollTreshold(30)
        .Filterable(filter => filter.Field("DisplayName").Operator("startswith"))
        .DataSource(dataSource => dataSource
            .Read(read => read.Url(Url.GetUrlRoot() + "/CRM/Leads").Data("additionalData"))
            .PageSize(10)))

    <script type="text/x-kendo-tmpl" id="SelectLeadListViewTemplate">
        <a href="@Url.GetUrlRoot()/CRM/Leads/EditLead?leadId=#=LeadId#">#:DisplayName#</a>
    </script>
     
    <script>
        function additionalData() {
            return {
                allOwners: true,
                ownerId: null,
                leadStatusId: null
            };
        }
    </script>

  2. Bill
    Bill avatar
    75 posts
    Member since:
    Feb 2013

    Posted 03 Mar 2014 in reply to Bill Link to this post

    I've just upgraded to 2013.3.1324.  This did not help.  I still have the issues.
  3. Kendo UI is VS 2017 Ready
  4. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2565 posts

    Posted 04 Mar 2014 Link to this post

    Hello Bill,

    The issues that you are having are due to incorrect pageSize configuration of the Kendo UI Mobile ListView. I would suggest you to check the following article, that gives you more information how to correctly configure the ListView and also why you do not see the same number of items as you have specified in the pageSize option:

    http://docs.telerik.com/kendo-ui/getting-started/mobile/listview#press-to-load-more-/-endless-scrolling

    Regards,
    Kiril Nikolov
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  5. Bill
    Bill avatar
    75 posts
    Member since:
    Feb 2013

    Posted 04 Mar 2014 in reply to Kiril Nikolov Link to this post

    Thanks Kiril.  I guess I didn't fully grasp how the endless scrolling was intended to be used.

    I'll disable it for now as I can't guarantee that there will be at least x number of records.  I'd rather not get into dynamically setting ListView options right now.  I was hoping it would work out of the box.
  6. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2565 posts

    Posted 05 Mar 2014 Link to this post

    Hi Bill,

    I am glad that you found my answer helpful.

    The endless scrolling works out of the box, but as its a really complex implementation it requires some fine tuning. If you follow the steps in the tutorial that I provided it should be easy enough to set up and work as expected.

    The endless scrolling is suitable for scenarios where you need to load a lot of records in your ListView. You said that you cannot guarantee that there will be x number of records, this makes me think that you do not need to loaded a bunch of records, so in this scenario the static ListView would be the better approach.

    Regards,
    Kiril Nikolov
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top
Kendo UI is VS 2017 Ready