Page reload after edit - keep position

Page reload after edit - keep position

petrusjakpetrusjak Posts: 15Questions: 3Answers: 1

My quicksupport is run out of date...so I post in the free community forum..
Anyhow, here is a link for debug: http://debug.datatables.net/ibolux

Problem is that the table page does not keep in same position after editing in the table. This is because I use the table.ajax.reload() as far as I understand and I need to change so that the page does not go back to page one after new dataset is drawn.

Any help would be appreciated!

// Aktiver inline edit når celle klikkes
$('#websakListe').on( 'click', 'tbody td.editable', function (e) {
editor.inline( this, { submitOnBlur: true } );
} );

editor.on( 'submitSuccess', function () {
    **table.ajax.reload();**
} );

setInterval( function () {
    **table.ajax.reload();**
}, 300000 );

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,818Questions: 1Answers: 10,517 Site admin
    Answer ✓

    You can use table.ajax.reload( null, false ); to keep the current page. See ajax.reload() for the full list of parameters for that method.

    Allan

  • petrusjakpetrusjak Posts: 15Questions: 3Answers: 1

    Perfect, works great - thanks!

This discussion has been closed.