{hero}

length

Since: DataTables 1.10

Number of elements in an API instance's result set.

Description

This option defines the number of elements that are stored in an API instance's result set.

This property makes use of the fact that DataTables API objects are "array like", in that they inherit a lot of the abilities and methods of the Javascript Array type.

In this case, this property is basically the same as the Array.length property. For more information about the original property, please refer to the Mozilla MDN documentation for length.

Type

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

Example

Use length to determine how many rows there are in the table:

var table = new DataTable('#myTable');

alert('Number of row entries: ' + table.column(0).data().length);