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

Pull to refresh with endless scrolling

6 Answers 182 Views
ListView (Mobile)
This is a migrated thread and some comments may be shown as answers.
MattM
Top achievements
Rank 1
MattM asked on 17 Jul 2012, 07:38 PM
Hi,

Is there a way to capture the 'pullToRefresh' event so I can clear out my 'pageSize / page' variables?

The issue is this:

If you have endless scroll enabled and scroll down to load the next page, when you scroll back up and drag down to activate the pull to refresh function, the ajax request is sent with the parameters used for the pagination.

var datasource = new kendo.data.DataSource( {
    serverPaging: true,
    pageSize: 30,
    page: 1,
    transport: {
            read: {
                url: url,
                datatype: 'jsonp'
            },
            parameterMap: function (options) {
            console.dir( options );
            var parameters = {
                st: ( options.page - 1 ) * options.pageSize
            }
  
            return parameters;
        }
    },
    schema: {
        data: function (data) {
            return data;
        },
        total: function (data) {
            return data.count; // total number of items
        }
    }
} );

I need to send an offset (st) rather than a page number to the database but regardless, when I pull to refresh, I'd like to reset those values.

Thanks!

6 Answers, 1 is accepted

Sort by
0
Dave
Top achievements
Rank 1
answered on 09 Aug 2012, 01:59 AM
I am experiencing the same problem.

I have been exploring the pull to refresh code for any callbacks or fire events that will allow us to capture the refresh event  but so far no luck.

Any help from the devs on this issue would be great?
0
Petyo
Telerik team
answered on 09 Aug 2012, 06:36 AM
Hi guys,

The problem is addressed in our latest internal build - the pull to refresh should work out of the box with the endless scrolling feature. Please give it a try and let us know how it goes.

Regards,
Petyo
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Dave
Top achievements
Rank 1
answered on 09 Aug 2012, 06:44 AM
Thanks for the reply Petyo.

Is the latest internal build available for trial users?
0
Sebastian
Telerik team
answered on 09 Aug 2012, 07:40 AM
Hi Dave,

Minor versions like internal builds or service packs are available with commercial licenses only.

Regards,
Sebastian
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Jay
Top achievements
Rank 2
answered on 10 Sep 2012, 04:17 PM
I too am very interested in hooking a "pull to refresh" event.  Is there any way to register for notification when the user has performed the action?  If not, please consider adding it.  Thanks.
0
Iliana Nikolova
Telerik team
answered on 12 Sep 2012, 06:43 PM
Hello Jay,

I believe the pull event of the Kendo UI Mobile Scroller will fit your requirements - it fires when the user pulls the scrolling container.
 
Regards,
Iliana Nikolova
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
MattM
Top achievements
Rank 1
Answers by
Dave
Top achievements
Rank 1
Petyo
Telerik team
Sebastian
Telerik team
Jay
Top achievements
Rank 2
Iliana Nikolova
Telerik team
Share this question
or