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 16 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 16
    <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: 2,730Questions: 22Answers: 311

    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: 10,288Questions: 25Answers: 2,347

    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

Sign In or Register to comment.