How can I open specific page by using Datatable api ?
How can I open specific page by using Datatable api ?
beklight
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
Use
Datable.ajax.reload(null, false);
The second parameter tells DataTables not to reset the paging - see theajax.reload()
documentation for more details.Allan
Thank you @allan ! I found enother one solution. But you looks shorter
var p = table.page.info();
table.page(p.page).draw( false );
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