Possible to have two pagination controls?

Possible to have two pagination controls?

sd_zuosd_zuo Posts: 78Questions: 1Answers: 0
edited September 2010 in General
Currently I placed a full-number pagination control on top of the table.
Is it possible to have a condensed pagination control at the bottom as well?

Replies

  • cdaiglecdaigle Posts: 57Questions: 0Answers: 0
    I know that you can include the same one (both of the same type) on the top and bottom using sDom ( http://datatables.net/usage/options#sDom (the 'p' option, for pagination)). If you want them to be of separate types though (condensed/two_button vs full_number), you will probably have to code the second one in yourself. (Shouldn't be too difficult, with the fnPageChange API function)
  • sd_zuosd_zuo Posts: 78Questions: 1Answers: 0
    Thanks for replying.
    BTW, the fnPageChange function only provides 4 methods to change pages, is it possible to jump to a specific page number?
  • cdaiglecdaigle Posts: 57Questions: 0Answers: 0
    As far as I know, you can't do this with any of the available API's. You might want to consider looking at the fnDisplayStart and fnAddDataAndDisplay on this page: http://datatables.net/plug-ins/api . You might be able to incorporate what is in them to create your own plugin that 'jumps' to a page rather than next/prev/first/last.

    Other than that - donating to Allan and telling him what you need might get him to show you a solution or provide a plugin api function.

    Hope this helps.
  • cdaiglecdaigle Posts: 57Questions: 0Answers: 0
    I just found something that might be close to what you are looking for: http://datatables.net/plug-ins/pagination#functions take a look at the text input function. At the very least it should have the code you need to make your own plugin.
  • sd_zuosd_zuo Posts: 78Questions: 1Answers: 0
    Oh, I missed your reply until today.
    Thank you for pointing out the plugin links! It appears to meet my requirements.
This discussion has been closed.