Since: DataTables 1.10

Initial order (sort) to apply to the table.


If ordering is enabled (ordering), then DataTables will perform a first pass order during initialisation. Using this parameter you can define which column(s) the order is performed upon, and the ordering direction. The order must be an array of arrays, each inner array comprised of two elements:

  • Column index to order upon
  • Direction so order to apply (asc for ascending order or desc for descending order).

This 2D array structure allows a multi-column order to be defined as the initial state should it be required.


This option can be given in the following type(s):


  • Value: [[0, 'asc']]


No ordering applied by DataTables during initialisation. The rows are shown in the order they are read by DataTables (i.e. the original order from the DOM if DOM sourced, or the array of data if Ajax / data sourced):

$('#example').dataTable( {
	"order": []
} );

Multi-column ordering as the initial state:

$('#example').dataTable( {
	"order": [[ 0, 'asc' ], [ 1, 'asc' ]]
} );


The following options are directly related and may also be useful in your application development.