Select extension with retain selection on reload and serverSide processing

Select extension with retain selection on reload and serverSide processing

bckspcbckspc Posts: 1Questions: 1Answers: 0

Hello all.

I'm trying to use the example on the Select extension "Retain selection on reload" (https://datatables.net/extensions/select/examples/initialisation/reload.html) in a table that has server side processing.

I'm setting the rowId, I'm using select style 'multi'. If I select several rows and use table.ajax.reload() method the selection is retained but when I click on page 2 (for example), I loose the selection when I come back to page 1.

Is this a bug or is it by design? The compatibility chart on the site says the select and serverSide are fully compatible that's why I'm asking.

Thanks for the help

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,812Questions: 1Answers: 10,516 Site admin
    Answer ✓

    By design - retaining row selection with server-side processing needs to be done server-side since the client-side doesn't know about the full list of rows available. It might be possible to implement something basic like in this example but that doesn't take account of selecting all rows, or rows being added / deleted on the server-side.

    Thanks for pointing out the compatibility chart - I'll update that.

    Regards,
    Allan

This discussion has been closed.