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: 63,530Questions: 1Answers: 10,473 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 2022

    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: 63,530Questions: 1Answers: 10,473 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.