1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
<?xml version="1.0" encoding="UTF-8" ?>
<dt-option group="feature">
<name>lengthChange</name>
<summary>Feature control the end user's ability to change the paging display length of the table.</summary>
<since>1.10</since>
<type type="boolean" />
<default value="true" />
<description>
When pagination is enabled, this option will control the display of an option for the end user to change the number of records to be shown per page. The options shown in the list are controlled by the `dt-init lengthMenu` configuration option.
Note that by default the control is shown at the top left of the table. That can be controlled using `dt-init dom` and CSS.
If this option is disabled (`false`) the length change input control is removed - although the `dt-api page.len()` method can still be used if you wish to programmatically change the page size and `dt-init pageLength` can be used to specify the initial page length. Paging itself is not affected.
Additionally, if pagination is disabled using the `dt-init paging` option, this option is automatically disabled since it has no relevance when there is no pagination.
</description>
<example title="Disable user ability to change number of records per page"><![CDATA[
$('#example').dataTable( {
"lengthChange": false
} );
]]></example>
<related type="option">dom</related>
<related type="option">lengthMenu</related>
<related type="option">language.lengthMenu</related>
<related type="option">pageLength</related>
<related type="api">page.len()</related>
</dt-option>
|