File: order.xml

package info (click to toggle)
datatables.js 1.10.19%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 6,348 kB
  • sloc: xml: 10,397; php: 4,448; sh: 521; makefile: 21
file content (42 lines) | stat: -rw-r--r-- 1,833 bytes parent folder | download | duplicates (3)
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
<?xml version="1.0" encoding="UTF-8" ?>
<dt-event>
	<name>order</name>
	<summary>order event - fired when the data contained in the table is ordered.</summary>
	<since>1.10</since>

	<type type="function">
		<signature>function( e, settings )</signature>
		<parameter type="object" name="e">
			jQuery event object
		</parameter>
		<parameter type="DataTables.Settings" name="settings">
			DataTables settings object
		</parameter>
		<scope>HTML table element</scope>
	</type>

	<description>
		The `dt-event order` event is fired whenever the data in the table is ordered. This is typically triggered by the end user ordering a column, but can also be initiated through the `dt-api order()` method and when a full redraw (by calling the `dt-api draw()`) occurs.

		Note that the `dt-event page` will be fired before the table has been redrawn with the updated data, although the data will internally have been ordered.

		Please note that, as with all DataTables emitted events, this event is triggered with the `dt` namespace. As such, to listen for this event, you must also use the `dt` namespace by simply appending `.dt` to your event name, as shown in the example below.
	</description>

	<example title="Show information about the current order using the API"><![CDATA[
var table = $('#example').DataTable();

$('#example').on( 'order.dt', function () {
	// This will show: "Ordering on column 1 (asc)", for example
	var order = table.order();
	$('#orderInfo').html( 'Ordering on column '+order[0][0]+' ('+order[0][1]+')' );
} );
]]></example>

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