orderMulti is not working
orderMulti is not working
rganeyev.work
Posts: 2Questions: 1Answers: 0
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.
This discussion has been closed.
Answers
Multi sort is working. As an example sort the
Position
column. Watch theDeveloper
rows then shift clickOffice
. You will see the order change by the Office.orderMulti
is on by default so you shouldn't have to add the command.Kevin
Yes, sorry. Seems I mistaken because my dataset have empty cells.