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.
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!
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!