How to display an arbitrary page
How to display an arbitrary page
Hello,
Basically, I want to pass in an URL parameter like 'http://site?page=10', and want the DataTable instance to display 10th page. The caveat is that my DataTable instance uses serverSide: true
setting.
Now I'm trying to use initComplete
callback, like the following:
initComplete: function(settings, json) {
var table = this.DataTable();
table.page(<?=$_REQUEST['page']?>).draw(false);
}
but it doesn't work as expected: the table pagination controls display the requested page number (i.e. 10), but the actual data are displayed from the first page.
Here is the link to the debug info: http://debug.datatables.net/ofavaf
Can anybody help me with this issue?
Answers
Finally reached the 'displayStart' option, it solved my problem.