Problem with the method stopEndlessScrolling

10 posts, 1 answers
  1. Marlon
    Marlon avatar
    1 posts
    Member since:
    Jan 2012

    Posted 25 Apr 2013 Link to this post

    Hello,
    I have a problem with the method stopEndlessScrolling, what happens is that initially I load my data well (image1). when I go down scroller, it still works well because I have yet to send me the data server (image2). When the server has no more data to send me what I do is stop the scroller with stopEndlessScrolling method after that the scroll is lost and fails to display the data (image3). Additionally, it is assumed that the endless scrolling a request each time scroll down the page by changing the number, but I can see that after there is no more data to bring the server, makes many requests and I do not understand why. This is my code:

    <div data-role="view"
        data-title="Art de inventario"
        data-layout="layout_inventory"
            data-init="filterableInventoryList"
             data-model="inventoryModel">
     
        <ul  id="inventoryList"
            data-role="listview"
        </ul>
    </div>
     
    <script id="inventoryTemplate" type="text/x-kendo-template">
          <div class="row">
                <img class="pullImage" src="#=Photo#"  />#= Name #
              <div class="metadata">
                    <span class="sublink" >Código :  #=Code#</span>
              </div>
           </div>
    </script>
    function filterableInventoryList(e){
                 var wid = $(window).width();
                 var dataSource = new kendo.data.DataSource({
                        pageSize: 12,
                        serverPaging: true,
                        serverFiltering: true,
                        transport: {
                            read:{
                                url:  localStorage.getItem("url") + "GetInventoryItems",
                                dataType: "json",
                                contentType: "application/json; charset=utf-8"
                            },
                            parameterMap: function(options) {
                                var b = selectMenuModel.get("branch");
                                var filter = options.filter ? options.filter.filters[0].value : "";
                                var parameters = {
                                    url: JSON.stringify(localStorage.getItem("url")),
                                    width : wid,
                                    branchId : JSON.stringify(b.Branch_Id),
                                    q: JSON.stringify(filter),
                                    count: options.pageSize,
                                    page: options.page
                                }
     
                                return parameters;
                            }
                        },
                        schema: { // describe the result format
                            data: "d", // the data which the data source will be bound to is in the "results" field
                            model : {  ...
                        },
                        change: function() {
                            //check whether any data is returned
                            if (!this.view()[0]) {
                                  //disable endless scroll
                             $("#inventoryList").data("kendoMobileListView").stopEndlessScrolling();
                            }
                        }
                    });
     
     
                $("#inventoryList").kendoMobileListView({
                    dataSource: dataSource,
                    template: $("#inventoryTemplate").text(),
                    filterable: {
                        filterable: true,
                        placeholder: "Buscar Item..."
                    },
                    endlessScroll: true,
                    scrollTreshold: 30 //treshold in pixels
                });
        }


  2. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 29 Apr 2013 Link to this post

    Hello Marlon,

     
    Thank for the code snippets and screenshots. Unfortunately, we are not able to replicate the issue locally and I will need a simple test project, which reproduces the problem. Thus we will be able to review the issue locally and advice you further.

    Regards,
    Georgi Krustev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Kendo UI is VS 2017 Ready
  4. Marlon
    Marlon avatar
    1 posts
    Member since:
    Jan 2012

    Posted 30 Apr 2013 Link to this post

    Hi, Georgi

    Look at this url there I have the example  (http://jsbin.com/ituder/5/edit). Do scroll down and when the server does not bring more data is broken scroll and makes the same number of requests of items there at the time.
  5. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 02 May 2013 Link to this post

    Hello Marlon,

     
    I tried to replicate the issue, but to no avail. Here is a screencast of my test. Probably I am missing something.

    Greetings,
    Georgi Krustev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  6. Marlon
    Marlon avatar
    1 posts
    Member since:
    Jan 2012

    Posted 02 May 2013 Link to this post

    Hi, Georgi

    In the screencast can see all requests that do and also the items that are lost, when I type in the input dimension increases its size, watch it here: http://screencast.com/t/TtJ4AXY4
  7. Vladimir Iliev
    Admin
    Vladimir Iliev avatar
    2172 posts

    Posted 06 May 2013 Link to this post

    Hi Marlon,

     
    I tried to reproduce the issue using the exact steps from the screencast but to no avail - everything is working as expected (exactly as demonstrated in the screencast that we provide). Could you please provide the following details - hopefully they will help us pinpoint the exact reason for this behavior:

    • The exact Chrome version used
    • What options are enabled in the Chrome Developers tools - "Overrides" section? (e.g.: "Emulate touch events")

    Kind Regards,
    Vladimir Iliev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  8. Marlon
    Marlon avatar
    1 posts
    Member since:
    Jan 2012

    Posted 07 May 2013 Link to this post

    Hi,

    Specifications are in the images. Specifications are in the images. It has nothing to do with the version of kendo? Thanks.



  9. Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 09 May 2013 Link to this post

    Hello Marlon,

     
    It seams that the service is down right now, which stops to continue my investigation. Is this a temporary black out or the service will not work any more?

    Regards,
    Georgi Krustev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  10. Marlon
    Marlon avatar
    1 posts
    Member since:
    Jan 2012

    Posted 09 May 2013 Link to this post

    Yeah, it was down for a while, but it is up again.
  11. Answer
    Georgi Krustev
    Admin
    Georgi Krustev avatar
    3707 posts

    Posted 10 May 2013 Link to this post

    Hello,

     
    Unfortunately, I am still not able to replicate the problem locally. One thing I noticed though, is the moment of stopEndlessScrolling() method call. I will suggest you wire the dataBound event of the widget and stop endless scroll there. Check the updated jsBin demo. Let me know if some of the aforementioned issues are still visible.

    Regards,
    Georgi Krustev
    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
Kendo UI is VS 2017 Ready