orderMulti is not working

orderMulti is not working

rganeyev.workrganeyev.work Posts: 2Questions: 1Answers: 0
edited March 2017 in Free community support

First I link to styles and scripts

<link rel="stylesheet" href="https://cdn.datatables.net/1.10.13/css/jquery.dataTables.min.css"/>    
<link rel="stylesheet" href="https://cdn.datatables.net/buttons/1.2.4/css/buttons.dataTables.min.css"/>    
<script src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/2.5.0/jszip.min.js"></script>
<script src="https://cdn.datatables.net/1.10.13/js/jquery.dataTables.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.2.4/js/dataTables.buttons.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.2.4/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.2.4/js/buttons.print.min.js"></script>    

Then I have very simple DataTable initialization:

    var datatable = $('#result > table:eq(0)').DataTable({
        dom: 'Bfrtip',
        buttons: [
            'copy', 'csv', 'excel', 'print'
        ],
        processing: true,
        orderMulti: true
    });

When I click some column's header it sorts by that column. But then I click any column while holding Shift the datatable shows that it will sort by columns I've selected, but no any actual sorting is happening.

http://jsfiddle.net/ecxhbdzc/1/

Answers

  • kthorngrenkthorngren Posts: 21,571Questions: 26Answers: 4,996

    Multi sort is working. As an example sort the Position column. Watch the Developer rows then shift click Office. You will see the order change by the Office.

    orderMulti is on by default so you shouldn't have to add the command.

    Kevin

  • rganeyev.workrganeyev.work Posts: 2Questions: 1Answers: 0
    edited March 2017

    Yes, sorry. Seems I mistaken because my dataset have empty cells.

This discussion has been closed.