does updating sort require serverside

does updating sort require serverside

mattctmattct Posts: 8Questions: 5Answers: 0

Hi,

I have a situation on mobile devices where I want to change the order of the table using a select dropdown.

Is it necessary to pass any additional data to server side in order to update the table or can this all be done client side?

Client side example:

    var myTable = $('#dt_basic').dataTable(myConfig);


    $('#filter').change(function() {

      if($('#filter').val() !== null) {
        myTable.DataTable().column($('#filter').val(), {order:'applied'}).order('desc');
        myTable.DataTable().clearPipeline();
        myTable.DataTable().ajax.reload();
      }
    });

Thanks

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 9,525Questions: 0Answers: 1,577
    Answer ✓

    Hi @mattct ,

    If you've got serverSide enabled, it will always go to the server when you change the ordering. The client only has knowledge of the data currently being displayed, only the server has all the data,

    Cheers,

    Colin

Sign In or Register to comment.