two tables on the same page, how to order different columns from the two tables?

two tables on the same page, how to order different columns from the two tables?

alanvictorjpalanvictorjp Posts: 4Questions: 1Answers: 0
edited September 2020 in Free community support

I have two tables on the same page, how can I order different columns from the two tables?

Answers

  • alanvictorjpalanvictorjp Posts: 4Questions: 1Answers: 0
    edited September 2020
    <script>
    $(document).ready(function() {
    $('table.display').dataTable( {
        "ordering": false,
        "oLanguage": { "sUrl": "assets/datatables/ptbr" },
        "lengthMenu": [15],
        dom: 'Bfrtip',
        buttons: [
             { extend: 'print', className: 'btn btn-primary', text: 'Imprimir' },
        ]
    } );
    });
    </script>
    
  • tangerinetangerine Posts: 3,342Questions: 35Answers: 394

    That's only one table.

  • alanvictorjpalanvictorjp Posts: 4Questions: 1Answers: 0

    how could I order different columns in two different tables on the same page?

  • alanvictorjpalanvictorjp Posts: 4Questions: 1Answers: 0

    I found a solution by disabling ordening in datatables and ordering via mysql. I would like a solution via datatables.

  • kthorngrenkthorngren Posts: 20,145Questions: 26Answers: 4,736

    Are you looking for the order option? Or maybe the order() API?

    If this doesn't help then please provide more details of what you are trying to acheive.

    Kevin

This discussion has been closed.