Basic initialization
This example shows the copy, csv, excel, pdfand printbuttons being used to display data export options. Buttons can be initialised very easily though the buttonsobject which can be given as an array of the buttons that you wish to display. The Boption in the domparameter will instruct DataTables where the buttons should be placed in the document - in this case, at the top right.
Custom button
This example shows a single button that is specified using the buttons.buttons.textand buttons.buttons.actionparameters only - it simply shows an alert when activated, but any Javascript function could be run when the button is activated. All parameters are optional, and each plug-in button type can also specify its own parameters. Also this example shows how buttons can have optional classes.
Button collection
This simple example shows a collectionwith two custom buttons. This collection button provides the ability to show a list of buttons when activated. The buttons it will display in the sub-list are defined by its buttonsproperty which can take all of the same button options as the buttons.buttonsarray (which the exception of another collection - collections cannot be nested).
Page length button
This example shows the pageLengthbutton being used with lengthMenuto specify page lengths of 10, 25, 50 and all rows, with language strings used for the buttons. The pageLengthbutton acts in exactly the same way as the default length list and will inherit the options specified by the lengthMenuoption. Dropdown menu uses default Bootstrap styling and control button style if fully configurable through options.