rowReorder

Enable and configure the RowReorder extension for DataTables. Please note - this property requires the RowReorder extension for DataTables.

Description

This option provides the ability to enable and configure RowReorder for DataTables. In its simplest form as the boolean true it will enable RowReorder with the default configuration options (as defined by $.fn.dataTable.RowReorder.defaults). It can also be used as an object to provide custom configuration options as described below.

Please note that as with all other configuration options for RowReorder, this option is an extension to the default set of DataTables options. This property should be set in the DataTables initialisation object.

Types

boolean

Description:

As a boolean value this property will enable RowReorder on the DataTable that is being created. true will enable RowReorder, while false will not.

This is a short-cut option to enable RowReorder with the default configuration options. Customisations can be made by giving this parameter as an object, see below.

object

Description:

If given as an object, RowReorder will be enabled on the target DataTable, with default values ($.fn.dataTable.RowReorder.defaults) extended, and potentially overwritten, by the options provided in this object. This is how RowReorder can be configured on an individual table basis, or through the defaults.

Default

  • Value: undefined

RowReorder will not be initialised by default

Examples

Enable RowReorder for a table:

$('#example').DataTable( {
	rowReorder: true
} );

Enable RowReorder with configuration options:

$('#example').DataTable( {
	rowReorder: {
		selector: ':last-child'
	}
} );