Pull to refresh with endless scrolling

7 posts, 0 answers
  1. MattM
    MattM avatar
    5 posts
    Member since:
    Jul 2012

    Posted 17 Jul 2012 Link to this post

    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!
  2. Dave
    Dave avatar
    5 posts
    Member since:
    Jul 2012

    Posted 08 Aug 2012 Link to this post

    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?
  3. Kendo UI is VS 2017 Ready
  4. Petyo
    Admin
    Petyo avatar
    2438 posts

    Posted 09 Aug 2012 Link to this post

    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!
  5. Dave
    Dave avatar
    5 posts
    Member since:
    Jul 2012

    Posted 09 Aug 2012 Link to this post

    Thanks for the reply Petyo.

    Is the latest internal build available for trial users?
  6. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 09 Aug 2012 Link to this post

    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!
  7. Jay
    Jay avatar
    45 posts
    Member since:
    Dec 2011

    Posted 10 Sep 2012 Link to this post

    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.
  8. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2592 posts

    Posted 12 Sep 2012 Link to this post

    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!
Back to Top
Kendo UI is VS 2017 Ready