searchPanes.order
Set the order of the Panes.
Please note - this property requires the SearchPanes extension for DataTables.
Description
This option is an alias to searchPanes.order
, which should be preferred when using DataTables 2+. It can be used to configure SearchPanes regardless of how the panes are inserted into the document (layout
or searchPanes
).
Please refer to the documentation for searchPanes.order
for full details of this option.
Type
string
- Description:
By setting the
searchPanes.order
to an array of thecolumns.searchPanes.name
property of the SearchPanes, the panes are displayed in that order.By default the
columns.searchPanes.name
is set to be the title of the column, or thesearchPanes.panes.header
value for custom Panes. This can be overridden if desired.
Default
- Value:
[]
The default value for the searchPanes.order
parameter is an empty array allowing SearchPanes to use the default order..
Examples
Set the order of the panes:
new DataTable('#myTable', {
layout: {
top1: 'searchPanes'
},
searchPanes: {
order: ['Age', 'Office', 'Position']
}
});
Set the order of the panes including a custom name:
new DataTable('#myTable', {
columnDefs: [
{
searchPanes: {
name: 'Length of Life'
},
targets: [3]
}
],
layout: {
top1: 'searchPanes'
},
searchPanes: {
order: ['Length of Life', 'Office', 'Position']
}
});
Related
The following options are directly related and may also be useful in your application development.