row().scrollTo()
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
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.