{hero}

colReorder.fixedColumnsRight

Disallow x columns from reordering (counting from the right).
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 right (colReorder.fixedColumnsLeft provides the option to count from the left).

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

Type

integer

Description:

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

Default

  • Value: 0

No columns will be discounted from the reordering operation.

Example

Disallow the last two columns in a table from being reorderable:

$('#example').DataTable( {
	colReorder: {
		fixedColumnsRight: 2
	}
} );

Related

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