orderAddDesc
Add the column to multi-column ordering (descending).
Please note - this property requires the ColumnControl extension for DataTables.
Description
DataTables has the ability to order the table's data over multiple columns, which is particularly useful if the data in the primary column being ordered has a large amount of repetition - the second column in the order will take over the order sequence.
This button, along with similar content-type buttons, provides the ability to access this multi-column ordering. In this case, when the button is triggered, it will add the host column to the already set ordering for the DataTable, in descending direction.
Display
The button added by this control will display as a simple icon button at the top level, or as a button with icon and text in a dropdown. It is generally expected that it will be used in a dropdown to avoid cluttering the UI.
Options
This button can have the following options set in its configuration object to customise its actions and display, in addition to those options which are available for all buttons (e.g. buttons.buttons.text
):
icon
- Type:
string
- Default:
orderAddDesc
Button icon. Can take the name of any icon available in DataTable.ColumnControl.icons
(which is a writeable object containing SVG icons).
text
- Type:
string
- Default:
Add Sort Descending
Trigger button text (shown when in a dropdown). Can also be set by the orderAddDesc
key of language.columnControl
, which will take priority if set.
Example
Show ordering icon and multi-column ordering addition icons in a dropdown.:
new DataTable('#example', {
columnControl: [
'order',
[
'orderAddAsc',
'orderAddDesc'
]
],
ordering: {
indicators: false,
handler: false
}
});