{hero}

row().scrollTo()

Since: Scroller 1.3.0

Scroll to a specific row.
Please note - this property requires the Scroller extension for DataTables.

Description

This method can be used to jump to a specific row in the DataTable. The row is selected using the row() method, so all of the options available for the row-selector data type are available.

Please note that it is not always possible to select all rows in the table using the row() selector method - specifically when server-side processing is enabled, only the rows that are loaded into the client-side can be selected. If you need to jump to a specific display index, use the scroller.toPosition() method.

Type

function row().scrollTo( animate )

Description:

Redraw the table's scrolling display to show the row selected by the row() method.

Parameters:
Returns:

DataTables API instance for chaining

Examples

Animated scroll to row index 100:

table.row(100).scrollTo();

Immediate draw at row index 0:

table.row(0).scrollTo(false);

Related

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