Since: DataTables 1.10

Vertical scrolling.


Enable vertical scrolling. Vertical scrolling will constrain the DataTable to the given height, and enable scrolling for any data which overflows the current viewport. This can be used as an alternative to paging to display a lot of data in a small area (although paging and scrolling can both be enabled at the same time if desired).

The value given here can be any CSS unit, or a number (in which case it will be treated as a pixel measurement) and is applied to the table body (i.e. it does not take into account the header or footer height directly).


This option can be given in the following type(s):


Enable vertical scrolling with pagination disabled:

$('#example').dataTable( {
  "scrollY": "200px",
  "scrollCollapse": true,
  "paging": false
} );


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