colReorder.fixedColumnsLeft

Disallow x columns from reordering (counting from the left). Please note - this property requires the ColReorder extension for DataTables.

Description

When allowing reordering of columns in a table, you may often wish to disallow reordering of certain columns (for example locking an index, select or action column to the start of a table). This option provides that ability, locking columns counting from the left (colReorder.fixedColumnsRight provides the option to count from the right).

This can be particularly useful if using ColReorder with the FixedColumns extension.

Type

integer

Description:

Number of columns (counting from the left) to disallow reordering of.

Default

  • Value: 0

No columns will be discounted from the reordering operation.

Example

Disallow the first column in a table from being reorderable:

$('#example').DataTable( {
	colReorder: {
		fixedColumnsLeft: 1
	}
} );

Related

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