Swap sPaginationType after initialization?

Swap sPaginationType after initialization?

tommcktommck Posts: 73Questions: 0Answers: 0
edited July 2011 in General
I have a situation where I need to change the pagination plugin after the table is already initialized.
When I change the "sPaginationType" option and call fnDraw(), the plugin never gets initialized.

Is there a way to make the plugin get initialized after table init?

Tom

Replies

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    Generally speak no, I'm afraid not. What you can do is destroy the table and re-initialise it with the new pagination type, or you could potentially alter the DOM and attach new listeners with what you are looking for - although that sounds a bit messy to me. It might be possible to hack DataTables to construct the pagination and then to use that, but I'd not something I've tried before...

    Allan
  • tommcktommck Posts: 73Questions: 0Answers: 0
    Well, it seems that it still calls the Update method, so I can just ensure that whatever was setup in the Init method was done in there and make it work that way.

    Tom
This discussion has been closed.