Configuring Free Text Columns
Summary
- Free Text Columns can be defined at design-time using Free Text Column Initial State
- The Free Text Column API can be used to add values programatically at run-time
Defining Free Text Columns
Free Text Columns can be defined in Free Text Column Initial Adaptable State.
Each FreeTextColumn object contains 2 useful properties that can be provided if required:
FreeTextStoredValues- allows the Free Text Column to be 'pre-populated' with relevant dataDefaultValue- enables each cell to display a default value unless explicitly overridden by the User
Developer Guide
Defining a Free Text Column
Hint
- To prevent filtering on Free Text Columns, set
enableFilterOnSpecialColumnsto false in Column Filter Options - This will also disallow filtering on all Calculated Columns and Action Columns
Adding Values Programmatically
A commonly used function in Free Text Column API is setStoredValues which allows you to update values stored in Free Text Columns programmatically.
setStoredValues
columnId: string, values: FreeTextStoredValue[], action: 'All' | 'Conflicting' | 'None'voidRestricting FreeText Column Data Entry
AG Grid Column Definitions
Typically Custom Columns are not defined in AG Grid Options.
Instead they are provided via Adaptable Options or Initial Adaptable State as appropriate.
However sometimes it is required to define the Column in AG Grid - e.g. if you want to show an AG Grid tooltip on the cell value.
This is possible by specifying a Column Type of freeTextColumn in the AG Grid Column Definition.
Hint
Make sure ColId in the Column Definition and ColumnId in the Custom Column definition are the same value
Find Out More
See Adding Special Column Types for more details and a demo