{hero}

columns-reordered

Since: ColReorder 2.0

Column reordering is finished and table updated.
Please note - this property requires the ColReorder extension for DataTables.

Description

This event let's you know when column reordering has finished. That might be after an individual call to colReorder.move() (which is used by the UI drag and drop reordering), or after all updates required by a call to colReorder.order().

The column-reorder event can also be used to know when reordering happens - it happens for every reorder action (i.e. it might trigger multiple times from colReorder.order()).

Please note that, as with all DataTables emitted events, this event is triggered with the dt namespace. As such, to listen for this event, you must also use the dt namespace by simply appending .dt to your event name, or use the on() method to listen for the event which will automatically append this namespace.

Type

function function( e, details )

Parameters:

Example

Notification of when columns have been reordered:

var table = new DataTable('#myTable', {
	colReorder: true
});

table.on('columns-reordered', function (e, settings, details) {
	console.log('Columns have been reordered');
});