how to show page navigation twice

how to show page navigation twice

iniayma@hotmail.cominiayma@hotmail.com Posts: 1Questions: 0Answers: 0
edited October 2009 in General
Great tool! Is there a way I can show a full number page navigation two times on the search results, at the top and also at the bottom?

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Hi iniayma,

    At the moment, the only way to do this would be to create a custom pagination plug-in which will do what you are looking for ( http://datatables.net/development/pagination ) since DataTables does not currently support duplicate control elements. This is something that will be addressed in a future release (although not entirely sure when yet!).

    Another option is to clone the pagination controls on each draw and use them as event delegation, and then keep cloning them on each draw to keep them up to date. So for example, if you client the third 'span' element on the cloned control, it would dispatch a 'click' event on the third span element of the real controls.

    Regards,
    Allan
  • jimvjimv Posts: 27Questions: 0Answers: 0
    Allan,
    A slightly differnent question, can the page navigation be moved to the top easily?
    Thanks
    Jim
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Hi Jim,

    Yes indeed - just use the sDom parameter:

    http://datatables.net/examples/basic_init/dom.html
    http://datatables.net/usage/options#sDom

    Regards,
    Allan
  • pedrolopespedrolopes Posts: 5Questions: 0Answers: 0
    Hey Jim,

    Have you managed to double the navigation tools? How have you done it? Or is it already available Allan?

    Cheers!
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Now available in DataTables 1.6 :-)

    Here is an example:
    http://datatables.net/examples/advanced_init/dom_multiple_elements.html

    You can duplicate (or have as many copies of a control as you want, 3, 4, n...) all controls, with the exception of the table itself ('t') in sDom.

    Allan
This discussion has been closed.