File: columns.orderData.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 (50 lines) | stat: -rw-r--r-- 1,578 bytes parent folder | download | duplicates (2)
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
38
39
40
41
42
43
44
45
46
47
48
49
50
<?xml version="1.0" encoding="UTF-8" ?>
<dt-option group="columns">
	<name>columns.orderData</name>
	<summary>Define multiple column ordering as the default order for a column</summary>
	<since>1.10</since>

	<type type="integer">
		<description>A single column index to order upon</description>
	</type>
	<type type="array">
		<description>Multiple column indexes to define multi-column sorting</description>
	</type>
	<default>
		Takes the index value of the column automatically
	</default>

	<description>
		Allows a column's sorting to take multiple columns into account when doing a order.

		For example with first name / last name columns next to each other, it is intuitive that they would be linked together to multi-column sort.
	</description>

	<example title="Using `orderData` to define multi-column sorting with `dt-init columnDefs`"><![CDATA[
$('#example').dataTable( {
  "columnDefs": [
    { "orderData": [ 0, 1 ],    "targets": 0 },
    { "orderData": 0,           "targets": 1 },
    { "orderData": [ 2, 3, 4 ], "targets": 2 }
  ]
} );
]]></example>

	<example title="Using `orderData` to define multi-column sorting with `dt-init columns`"><![CDATA[
$('#example').dataTable( {
  "columns": [
    { "orderData": [ 0, 1 ] },
    { "orderData": 0, },
    { "orderData": [ 2, 3, 4 ] },
    null,
    null
  ]
} );
]]></example>

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