{hero}

scroller.rowHeight

Set the row height, or how the row height is calculated.
Please note - this property requires the Scroller extension for DataTables.

Description

It is important for Scroller to know the height of the rows in the DataTable so it can perform its virtual display calculations. All rows must be of the same height, and Scroller will attempt to automatically calculate the height of rows itself.

However, the value that is used can be overridden using this parameter. Generally it is not recommended that this be used - it offers little in the way of performance enhancements, although it can be useful if styling that alters the height of the rows is applied to the table after initialisation.

Types

integer

Description:

Row height - pixels

string

Description:

As a string this option can only be the value auto, which will instruct Scroller to determine the row height automatically.

Default

  • Value: auto

Compute the row height automatically.

Example

Set the row height to a specific pixel value:

new DataTable('#myTable', {
	scrollY: true,
	scroller: {
		rowHeight: 30
	}
});