rows().recalcHeight()

Since: FixedColumns 3.1.0

Recalculate the height of one or more rows after a data change. Please note - this property requires the FixedColumns extension for DataTables.

Description

This method can be used to flag one or more rows in the table to have their heights recalculated when using semiauto row height matching (fixedColumns.heightMatch) on the next draw (draw()). This function will have no effect when none or auto row height matching is used.

This can be useful when the data in a DataTable has changed, potentially effecting the heights of the rows in question.

In future this will be automated once DataTables added events for table update actions, but at the moment this method must be called.

Type

function rows().recalcHeight()

Description:

Mark the heights of the selected rows (from rows()) to be recalculated on the next draw.

Returns:

DataTables API instance - unmodified.

Example

Recalculate the heights of all rows:

var table = $('#myTable').DataTable();

table.rows().recalcHeight().draw();