File: columns.title.xml

package info (click to toggle)
datatables.js 1.11.5%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 22,848 kB
  • sloc: javascript: 65,075; xml: 10,712; php: 4,741; sh: 544; makefile: 18
file content (40 lines) | stat: -rw-r--r-- 1,444 bytes parent folder | download
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
<?xml version="1.0" encoding="UTF-8" ?>
<dt-option group="columns">
	<name>columns.title</name>
	<summary>Set the column title</summary>
	<since>1.10</since>

	<type type="string" />
  <default>
    Value read from the column's header cell.
  </default>

	<description>
    The titles of columns are typically read directly from the DOM (from the cells in the `tag THEAD` element), but it can often be useful to either override existing values, or have DataTables actually construct a header with column titles for you (for example if there is not a `tag THEAD` element in the table before DataTables is constructed). This option is available to provide that ability.

    Please note that when constructing a header, DataTables can only construct a simple header with a single cell for each column. Complex headers with `colspan` and `rowspan` attributes must either already be defined in the document, or be constructed using standard DOM / jQuery methods.
	</description>

	<example title="Set the first column's title with `dt-init columnDefs`"><![CDATA[
$('#example').DataTable( {
	columnDefs: [ {
		title: 'My column title',
		targets: 0
	} ]
} );
]]></example>

	<example title="Set the first column's title with `dt-init columns`"><![CDATA[
$('#example').DataTable( {
  columns: [
    { title: 'My column title' },
    null,
    null,
    null,
    null
  ]
} );
]]></example>

  <related>-init columns.ariaTitle</related>
</dt-option>