Server side ajax reloads same page results but pagination is wrong

Server side ajax reloads same page results but pagination is wrong

ionutrizaionutriza Posts: 4Questions: 2Answers: 0

Hello,

So i change data from the datatable via a separate ajax and when the success happens i try to reload the Datatable with the same page so i can see the impact using:
.ajax.reload(null,false)

When that happens the ajax seems to request the correct page, so i get the correct results, but the datatable shows page 1 and the summary shows showing 1 to 10 of X entries ...

Any ideas why this happens ?
Anything I'm missing?

Answers

  • ionutrizaionutriza Posts: 4Questions: 2Answers: 0

    A temporary fix would be to set the page manually.
    Since i preserve the limit/offset params in the ajax.reload request with:
    .ajax.reload(null,false)
    I can set the page of the dt on the drawCallback function:
    fnDrawCallback: function (oSettings) { table.page(oSettings.page);

This discussion has been closed.