ColReorder example Predefined column ordering

ColReorder provides the ability to specify a column ordering which is not that of the HTML (which typically you will want) through the parameter colReorder.order. This is an array of integers with the column ordering you want.

For full information about the ColReorder options, please refer to the ColReorder options documentation.

Start dateAgeOfficePositionNameSalary
Start dateAgeOfficePositionNameSalary
2008/11/2833TokyoAccountantAiri Satou $162,700
2009/10/0947LondonChief Executive Officer (CEO)Angelica Ramos $1,200,000
2009/01/1266San FranciscoJunior Technical AuthorAshton Cox $86,000
2012/10/1341LondonSoftware EngineerBradley Greer $132,000
2011/06/0728San FranciscoSoftware EngineerBrenden Wagner $206,850
2012/12/0261New YorkIntegration SpecialistBrielle Williamson $372,000
2011/05/0338LondonSoftware EngineerBruno Nash $163,500
2011/12/1221New YorkPre-Sales SupportCaesar Vance $106,450
2011/12/0646New YorkSales AssistantCara Stevens $145,600
2012/03/2922EdinburghSenior Javascript DeveloperCedric Kelly $433,060
Affichage de l'élement 1 à 10 sur 57 éléments

The Javascript shown below is used to initialise the table shown in this example:

1
2
3
4
5
6
7
8
$(document).ready(function() {
    $('#example').dataTable( {
        dom: 'Rlfrtip',
        colReorder: {
            order: [ 4, 3, 2, 1, 0, 5 ]
        }
    } );
} );

In addition to the above code, the following Javascript library files are loaded for use in this example: