<?xml version="1.0" encoding="UTF-8" ?>
<dt-example table-type="html" order="8">

<css lib="datatables colvis" />
<js lib="jquery datatables colvis">
<![CDATA[
$(document).ready(function() {
	$('#example').DataTable( {
		dom: 'C<"clear">lfrtip',
		colVis: {
			exclude: [],
			groups: [
				{
					title: "Engine",
					columns: [ 0, 3 ]
				},
				{
					title: "Client",
					columns: [ 1, 2 ]
				}
			]
		}
	} );
} );
]]>
</js>

<title lib="ColVis">Group columns</title>

<info><![CDATA[

It can be useful at times to show and hide multiple columns together - i.e. grouping them together. Groupings are defined by the `groups` array. Create a group button by naming it (using the `title` option) and specifying by index which columns belong to it (using the `columns` option).

Note also that this ability to create groups can be used in combination `exclude` to remove individual columns from the list (should you wish them to only be used in the groups), or set `exclude = [ 'all' ]` to show only the grouping buttons (i.e. individual column control buttons will not be shown).

For full information about the ColVis options, please refer to the [ColVis options documentation](//datatables.net/extensions/colvis/options).

]]></info>

</dt-example>
