Start not with page one
Start not with page one
Andreas S.
Posts: 208Questions: 74Answers: 4
Is it possible, before the table is initialized, to specify with which page number the table is called up? I tried preinit.dt, but there I could only define the length, but not with which side the table is displayed.
Here is my code that I tried with:
var singlels = $( '#singletbl' ).on( 'preInit.dt', function( e, settings ) {
var api = new $.fn.dataTable.Api( settings );
api.page( 3 );
} ).DataTable( {
language: {
url: i18n_url
},
ajax: {
url: ajaxurl + '&m_uuid=' + sessionStorage.m_uuid + '&st=1',
type: 'POST',
dataSrc: 'content'
},.....
Andreas
This question has an accepted answers - jump to answer
Answers
initComplete
would be the place for that - see here: http://live.datatables.net/fohabuno/1/editYou could also try
displayStart
, which may be simpler,Colin