Scrolling - scrollingPagination.js OR scroller.js plugin ?
Scrolling - scrollingPagination.js OR scroller.js plugin ?
I'm using the datatables 1.10-dev version and trying to figure out how to stop the header from overwriting my custom styled header row that I created.
i see in the code that the version of scrolling I am using now:
'sScrollY' : '250px',
'bScrollInfinite' : true,
'bScrollCollapse' : true,
'bScrollInfinite' maps to 'bInfinite' and the comments there say this is deprecated.
/**
* Infinite scrolling enablement flag. Now deprecated in favour of
* using the Scroller plug-in.
* Note that this parameter will be set by the initialisation routine. To
* set a default use {@link DataTable.defaults}.
* @type boolean
*/
So I've tried:
'sScrollY' : '250px',
'bPaginate' : true,
'sPaginationType' : 'scroller',
And only getting 'pluging is undefined errors.
I have included it in the code, but it does not pick it up.
I've tried changing the 'sPaginationType' to 'scrolling', as I orginally saw in the documentation, but nothing is coming up.
What am I missing?
Any suggestions would be greatly appreciated.
Thank you.
i see in the code that the version of scrolling I am using now:
'sScrollY' : '250px',
'bScrollInfinite' : true,
'bScrollCollapse' : true,
'bScrollInfinite' maps to 'bInfinite' and the comments there say this is deprecated.
/**
* Infinite scrolling enablement flag. Now deprecated in favour of
* using the Scroller plug-in.
* Note that this parameter will be set by the initialisation routine. To
* set a default use {@link DataTable.defaults}.
* @type boolean
*/
So I've tried:
'sScrollY' : '250px',
'bPaginate' : true,
'sPaginationType' : 'scroller',
And only getting 'pluging is undefined errors.
I have included it in the code, but it does not pick it up.
I've tried changing the 'sPaginationType' to 'scrolling', as I orginally saw in the documentation, but nothing is coming up.
What am I missing?
Any suggestions would be greatly appreciated.
Thank you.
This discussion has been closed.
Replies
Allan
Anyway, I tried to setup a fiddle; http://jsfiddle.net/BdHXh/
Another issue is that when I try to include the datatables.scroller.js file, I get the error 'Scroller requires 1.9.0 ...' I'm using the 1.10-dev version and there seems to be a number of things deprecated.
When I try 1.9.4, everything locks up and the script never completes.
I'm not currently using sDom and when I use: "sDom": "frtiS", the table looses it's footer, he search shows back up and the pagination (continus scrolling) doesnt work. Also, when using the 'S' it shows up as the 'two-button' pagination by default it seems.
I have to be missing something.
Allan
'this.s.dt.oApi._fnCalculateEnd is not a function'
I added the
#history table#invoices tbody > tr > td {
white-space: nowrap;
}
to my CSS and it ends correctly with the last row.
Also, it says in the footer: 'Showing 1 thru 9 of 100' even though only 6 are showing.
And finally, using the 'sDom' I loose my custom footer styling I had.
I need to retain my custom footer styling as well as the custom header styling I have lost.
Thanks for the follow ups.
I am using "sDom": '<"H">rtS<"F"i>', (because I finally noticed the 'if you're using jQueryUI' part...)
and I have my footer back.
BUT...
The rows now roll past the nd of the table allowing the scroller to continue and the table empties.
Now... if i can turn off the custom headers that scrolling is making, I think I would be in business (once the 'this.s.dt.oApi._fnCalculateEnd is not a function' error goes away)
That's likely don't to breaking the whole draw process. Have you tried picking up Scroller from git? That error should be fix as I committed a change for it a few weeks back: https://github.com/DataTables/Scroller/commits/master
Allan
Issues that remain:
- Total of records showing is off.. When the table shows 6 it says 11, and when I scroll through them all, it says 206 of 114
- Custom header gone. (I'm thinking from the above response, that you meant that this is gone due to header redraw for scroller bar, but is there a way to not have it redraw?)
Thanks again.
Also, are all rows the same height? That is a requirement of Scroller.
Allan