AdapTable provides many functions to allow you to create 'special columns'.
An Action Column is used when you want to add a button to a row.
Create an Action Column n the ActionColumn property of Predefined Config, which will allow you to render the button how you wish and also provide the function that will be applied when the button is clicked.
One of the most powerful functions in AdapTable is Calculated Columns which allows you to create your own columns at run-time.
Unlike 'regular' columns, Calculated Columns do not store data; instead you create an Expression which is evaluated per row.
Calculated Columns can either be static (i.e. show a single value) or dynamic (i.e. based on other columns in the row).
There are numerous potential uses for Calculated Columns including showing Historical Data, and allowing you to do 'what if' or scenario analysis by copying some columns and see what happens if you change their values.
The Expression in the Calculated Column updates in real time as values in the columns which form part of that expression change.
Calculated Columns include an Expression that you will write. This will typically include a mathematical operator and reference other columns. There is a huge array of potential mathematical operators that you can use to create your Expression. (We use the Math.JS library to evaluate the Expression(.
You can include as many operators as you want in your Expression: there is no limit on the number of operators or the number of other columns that you can reference.
We plan in future releases to enable drag and drop so that you can more easily reference other columns when creating a Custom Column Expression.
If you want to refer to other columns in the Expression you need to reference them as Col("ColumnName"). (e.g. Col("Bid").
You can use either the column's field name (the private identifier for the column used by the underlying grid - e.g. Col("orderId") ) or its Friendly Name (the Caption displayed for the Column in the Header row - e.g. Col("Order ID") ).
Free Text Columns are special columns which you create to save comments and other text that you want to save.
Any text stored in a Free Text Column is saved as part of the user state and not with the actual data source.
These columns are particularly useful if you wish to create a 'Comments' column or something pertinent only to you.
Sparkline Columns are special columns where you can see an array of data as a Sparkline.
They are particularly useful if you have pricing or historical data.
You can choose how the Sparkline will appear visually.
By their nature Sparkline columns require more intensive rendering than normal columns so use sparingly or take into account the extra time it will take to render the Sparkline.