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 programmatically 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'voidAG Grid Column Definitions
Typically Free Text Columns are provided only in Initial Adaptable State and not also defined in Grid Options.
However sometimes it is required to define the Free Text 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 an accompanying demo