How can I open specific page by using Datatable api ?

How can I open specific page by using Datatable api ?

beklightbeklight Posts: 4Questions: 1Answers: 0

Link to test case:
Debugger code (debug.datatables.net):
Error messages shown:
Description of problem:
For example:

var pageInfo = Datable.page.info();

Datable.ajax.reload()
//how after relouding can I take back previos page?

Replies

  • allanallan Posts: 56,888Questions: 1Answers: 9,042 Site admin

    Use Datable.ajax.reload(null, false); The second parameter tells DataTables not to reset the paging - see the ajax.reload() documentation for more details.

    Allan

  • beklightbeklight Posts: 4Questions: 1Answers: 0
    edited September 23

    Thank you @allan ! I found enother one solution. But you looks shorter

    var p = table.page.info();
    table.page(p.page).draw( false );

  • allanallan Posts: 56,888Questions: 1Answers: 9,042 Site admin

    But that isn't doing an Ajax reload. Are you using server-side processing? If so then even shorter would be table.draw(false);.

    Allan

Sign In or Register to comment.