{hero}

colReorder.reset()

Since: ColReorder 1.2.0

Restore the loaded column order.
Please note - this property requires the ColReorder extension for DataTables.

Description

This method provides the ability to restore the original order of the columns, as was defined in the HTML during the table's initialisation. This will undo any reordering changes that the end user or the API has made prior to calling this method.

The reorder triggered by this method is immediate and there is no requirement to redraw the table.

Type

function colReorder.reset()

Description:

Restore the column order that the columns were in when initially loaded.

Returns:

DataTables API instance

Example

Restore column ordering on click of a button:

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

$('#reset').click(function (e) {
	table.colReorder.reset();
});