Since: DataTables 2.0

Text for page length control.


This parameter allows you to readily specify the entries in the length drop down select list that DataTables shows when pagination is enabled. It is an array of options - each option can either be:

  • An integer which will be used for both the displayed option and the value to use for the display length, or
  • An object which contains label and value properties. This can be useful for language strings such as All.

The page length values must always be integer values greater than 0, with the sole exception of -1. When -1 is used as a value this tells DataTables to disable pagination (i.e. display all rows).

Note that the pageLength property will be automatically set to the first value given in this array, unless pageLength is also provided.

This option will default to the value given by lengthMenu, which should generally be preferred over this option as the language strings can be loaded by Ajax and shared for the whole table, but if needed, this option is available to override that.


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


Defaults to the lengthMenu option's value.


Provide search input string:

new DataTable('#myTable', {
	layout: {
		topEnd: {
			search: {
				menu: [5, 10, 15, 20]


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