columns.orderable

Since: DataTables 1.10

Enable or disable ordering on this column.

Description

Using this parameter, you can remove the end user's ability to order upon a column. This might be useful for generated content columns, for example if you have 'Edit' or 'Delete' buttons in the table.

Note that this option only effects the end user's ability to order a column. Developers are still able to order a column using the order option or the order() method if required.

Type

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

Default

  • Value: true

Examples

Disable ordering on the first column with columnDefs:

$('#example').dataTable( {
  "columnDefs": [
    { "orderable": false, "targets": 0 }
  ]
} );

Disable ordering on the first column with columns:

$('#example').dataTable( {
  "columns": [
    { "orderable": false },
    null,
    null,
    null,
    null
  ]
} );

Related

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