colReorder.disable()
Disable ColReorder's interactions.
Please note - this property requires the ColReorder extension for DataTables.
Description
This method can be used to disable the ColReorder end user interaction with a DataTable.
Please note that in order to be able to enable and disable ColReorder, the colReorder
option must be specified in the DataTable initialisation. This method cannot be used to control enablement of ColReorder if colReorder
has not be used.
Type
function colReorder.disable()
- Description:
Disable end user ability to reorder columns.
- Returns:
DataTables API instance
Example
Enable / disable column reordering using buttons:
var table = new DataTable('#myTable', {
colReorder: true
});
$('#enableReordering').on('click', function () {
table.colReorder.enable(true);
});
$('#disableReordering').on('click', function () {
table.colReorder.disable();
});
Related
The following options are directly related and may also be useful in your application development.