Scroller with pagination buttons possible?
Scroller with pagination buttons possible?
mrtomtom
Posts: 7Questions: 4Answers: 0
Hi there,
I've just upgraded to the new(ish) DataTables 1.10 and I was wondering if it's possible to have the scroller extension as well as having pagination buttons? Ideally I'd like to have it so as you scroll down using infinite scroller the pagination numbers get highlighted as you go. Is this possible? I can work out how to get the scroller working OR pagination, but not both sadly.
$('#tasktable').DataTable( {
ajax: "/loadjson/",
dom: 'fTtirpS',
tableTools: {
"sSwfPath": "/public/datatables/extensions/TableTools/swf/copy_csv_xls_pdf.swf",
"aButtons": [ "pdf", "xls" ]
},
bDeferRender: true,
scrollY: 350,
scrollCollapse: true,
stateSave: false,
scroller: {
loadingIndicator: true,
displayBuffer: 10
}
});
Does anyone know how to solve this?
Kind regards,
Tom
This discussion has been closed.
Answers
No - sorry. Scroller uses the DataTables paging internally to provide its interface. The blog post introducing Scroller has some details about how it works (please excuse the error on the page at the moment!).
You could hook into the scroll event and show a custom paging control, but there isn't any code built into the libraries to do that.
Regards,
Allan
Sorry I rudely forgot to answer this -- Ok thanks for letting me know. It would be a great feature to add in the future!
No worries and thanks for the feedback.
Allan