Action Column Demo

The Adaptable Blotter provides an Action Column function that allows you to specify (and optionally render) a button to placed in a column.

When the button is clicked an On('ActionColumnClicked') event fires, providing details of column clicked and current data in the row; subscribe to this event and perform any additional logic that is required.

You can, optionally, provide a ShouldRenderPredicate function which decides whether the button appears and a RenderFunction function that allows you provide your own button implementation.

In this example we have created Action Columns Plus and Minus and in the onActionColumnClicked event handler we update the Item Count column (though we do also have a Plus/Minus Function).

We also created a Multiply Action Column which doubles or trebles the Item Cost column. We've applied our own rendering function for the button, with logic to say it shouldn't appear if Employee is Margaret.

Lastly we created an Action column to delete a row which was trivial to implement with just one line of code using the API: blotterApi.gridApi.deleteGridData([args.data[0].id.rowData]);

Adaptable Blotter Help Resources: Predefined Config, Blotter API, FAQ, Videos, User Guide.