mirror of
https://github.com/DataTables/DataTables.git
synced 2025-02-28 01:54:15 +01:00
26 lines
1000 B
XML
26 lines
1000 B
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<dt-example table-type="html-complex-header">
|
|
|
|
<css lib="datatables" />
|
|
<js lib="jquery" />
|
|
<js lib="datatables" />
|
|
|
|
<title>Complex headers (rowspan and colspan)</title>
|
|
<js><![CDATA[
|
|
$(document).ready(function() {
|
|
$('#example').dataTable();
|
|
} );
|
|
]]></js>
|
|
|
|
<info><![CDATA[
|
|
|
|
When using tables to display data, you will often wish to display column information in groups. DataTables fully supports `colspan` and `rowspan` in the table's header, assigning the required sort listeners to the TH element suitable for that column.
|
|
|
|
Each column must have one TH cell which is unique to it for the listeners to be added. By default DataTables will use the bottom unique cell for the column to attach the sort listener, if more than one cell for a column if found. The `dt-init sortCellsTop` option can be used to tell DataTables to use the top cell if you prefer.
|
|
|
|
The example shown below has the core browser information grouped together.
|
|
|
|
]]></info>
|
|
|
|
</dt-example>
|