{hero}

rowGroup().enable()

Since: RowGroup 1.0.0

Enable or disable RowGroup's interaction with the table.
Please note - this property requires the RowGroup extension for DataTables.

Description

This method can be used to dynamically enable the row grouping feature offered by the RowGroup extension for DataTables, and also optionally to disable it using a toggle flag. This can be useful for cases where you want the end user to be able to toggle grouping, and optionally to switch between the grouping used for the table.

Please note that the visual effect for grouping being either enabled or disabled is not shown until the DataTable is redrawn. This would typically be done by calling the draw() method.

Type

function rowGroup().enable( [ enable ] )

Description:

Allows the row grouping action to be dynamically enabled, or optionally disabled.

Parameters:
Returns:

DataTables API instance

Example

Enable row grouping:

var table = new DataTable('#myTable', {
	rowGroup: {
		enable: false
	}
});

table
	.rowGroup()
	.enable()
	.draw();

Related

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