pagination: combine full numbers and scrolling?

pagination: combine full numbers and scrolling?

webguruwebguru Posts: 16Questions: 0Answers: 0
edited February 2011 in General
I need the pagination functionality of full numbers but LOVE the scrolling version. Is it possible to combine these two pagination styles?

Replies

  • webguruwebguru Posts: 16Questions: 0Answers: 0
    no answer after 6 days... is this because I am missing something obvious or does no one have the answer?
  • allanallan Posts: 63,538Questions: 1Answers: 10,476 Site admin
    It is indeed possible you just need to enable them both. Or, are you looking for one long list which is scrolling, and the scroll position will change automatically when you use the paging controls? If the latter, then yes it is possible, but you'll need to write some Javascript to do it, as there isn't a built in way of doing this - you just need to control the scrollTop parameter.

    Allan
  • MemeDeveloperMemeDeveloper Posts: 5Questions: 0Answers: 0
    I have made a customised "full_numbers_scrolling" patch which (I think) achieves what the OP was asking for i.e. It works as per "full_numbers", with the modification that when you choose "next" or "previous", it runs the lovely animated scrolling effect as per the "scrolling" example

    http://www.datatables.net/examples/plug-ins/paging_plugin.html

    If anyone would like it please let me know here, or email me, I'd be very happy to contribute it back into the community if it helps anyone. I LOVE DATATABLES !!! Thanks all. Fantastic project !
  • allanallan Posts: 63,538Questions: 1Answers: 10,476 Site admin
    Oooo - sounds fantastic. If you could post it here or mail it through to me (e-mail address at the top of the DataTables source code) that would be awesome. I can then put it up on the site (let me know what credit you'd like :-) ).

    Regards,
    Allan
  • benDevbenDev Posts: 6Questions: 0Answers: 0
    Hi MemeDeveloper,
    Would love to get my hands on the "full_numbers_scrolling" plugin you are talking about.
    Can you please post it here/on the website ?
    Thanks,
    Ben
  • benDevbenDev Posts: 6Questions: 0Answers: 0
    Dear Allan,
    What Im trying to achieve is to get page numbers and prev/next links (just like "sPaginationType": "full_numbers") but when i press prev or next to get the same animation like im getting when using "sPaginationType": "scrolling". You wrote i can enable them both ? how can i do that ? trying to specify sPaginationType twice just gets the last one defined.
    Thanks for everything ! Amazing work on the plugin !
    Ben
  • allanallan Posts: 63,538Questions: 1Answers: 10,476 Site admin
    It would require a modification to the scrolling plug-in - the "full_numbers_scrolling" plug-in that MemeDeveloper mentions. I don't appear to have that code, so I think it will probably require reimplementing. It should just be a case of combining the full_numbers code from DataTables core and the scrolling plug-in code.

    Allan
This discussion has been closed.