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

Problem with the method stopEndlessScrolling

9 Answers 106 Views
ListView (Mobile)
This is a migrated thread and some comments may be shown as answers.
Marlon
Top achievements
Rank 1
Marlon asked on 25 Apr 2013, 04:57 PM
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
            });
    }


9 Answers, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 29 Apr 2013, 12:58 PM
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!
0
Marlon
Top achievements
Rank 1
answered on 30 Apr 2013, 09:00 PM
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.
0
Georgi Krustev
Telerik team
answered on 02 May 2013, 09:15 AM
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!
0
Marlon
Top achievements
Rank 1
answered on 02 May 2013, 01:45 PM
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
0
Vladimir Iliev
Telerik team
answered on 06 May 2013, 02:00 PM
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!
0
Marlon
Top achievements
Rank 1
answered on 07 May 2013, 05:00 PM
Hi,

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



0
Georgi Krustev
Telerik team
answered on 09 May 2013, 03:24 PM
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!
0
Marlon
Top achievements
Rank 1
answered on 09 May 2013, 03:41 PM
Yeah, it was down for a while, but it is up again.
0
Accepted
Georgi Krustev
Telerik team
answered on 10 May 2013, 07:23 AM
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!
Tags
ListView (Mobile)
Asked by
Marlon
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Marlon
Top achievements
Rank 1
Vladimir Iliev
Telerik team
Share this question
or