Basic initialization

Buttons can be initialised very easily though the buttons object which can be given as an array of the buttons that you wish to display.

{{row.name}} {{row.position}} {{row.office}} {{row.age}} {{row.salary}} {{row.startdate}}
Custom button

Fundamentally, each button is described by an object - this object is read by Buttons and displayed as appropriate. There are a number of parameters that Buttons will automatically look for in the button description object such as buttons.buttons.text and buttons.buttons.action which are the two fundamental parameters (button text and the action to take when activated).

{{row.name}} {{row.position}} {{row.office}} {{row.age}} {{row.salary}} {{row.startdate}}

Class names

This example also shows button definition objects being used to describe buttons. In this case we use the buttons.buttons.className option to specify a custom class name for the button. A little bit of CSS is used to style the buttons - the class names and CSS can of course be adjusted to suit whatever styling requirements you have. RedOrangeGreen

{{row.name}} {{row.position}} {{row.office}} {{row.age}} {{row.salary}} {{row.startdate}}

Multiple button groups

Buttons' ability to have new instances constructed arbitrarily gives it the ability to have multiple button instances created for a single DataTable. This can be useful if you wish to display button groups with different functionality (file export, editing, etc).

{{row.name}} {{row.position}} {{row.office}} {{row.age}} {{row.salary}} {{row.startdate}}