File: column%28%29.order%28%29.xml

package info (click to toggle)
datatables.js 1.10.13%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 6,232 kB
  • ctags: 1,329
  • sloc: xml: 10,249; php: 4,387; sh: 492; makefile: 21
file content (37 lines) | stat: -rw-r--r-- 1,822 bytes parent folder | download | duplicates (6)
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
32
33
34
35
36
37
<?xml version="1.0" encoding="UTF-8" ?>
<dt-api group="columns">
	<name>column().order()</name>
	<summary>Order the table by the selected column.</summary>
	<since>1.10</since>

	<type type="function">
		<signature>column().order( direction )</signature>
		<description>Order the table, in the direction specified, by the column selected by the `dt-api column()` selector.</description>
		<parameter type="string" name="direction">
			Direction of sort to apply to the selected column - `dt-string desc` (descending) or `dt-string asc` (ascending).
		</parameter>
		<returns type="DataTables.Api">DataTables API instance</returns>
	</type>

	<description>
		This method provides a useful alternative to the `dt-api order()` method, allowing you to select the column that you want to be ordered using the flexible `dt-api column()` selector and having it ordered in the direction specified.

		Note that if the selector used for `dt-api column()` matches more than one column, the result will be truncated to a single column. To perform multi-column ordering, please use `dt-api columns().order()` or `dt-api order()`.

		Please be aware that this method sets the ordering to apply to the table - it does not actually perform the order. In order to have the order performed, use the `dt-api draw()` method, which can be called simply as a chained method of the `dt-api order()` method's returned object - for example `table.order([0, 'desc']).draw();`.
	</description>

	<example title="Sort by the first visible column"><![CDATA[
var table = $('#example').DataTable();

table
	.column( '0:visible' )
	.order( 'asc' )
	.draw();
]]></example>

	<related type="option">order</related>
	<related type="option">ordering</related>
	<related type="api">order()</related>
	<related type="api">columns().order()</related>
</dt-api>