Get Column Values

User Function which is invoked each time distinct values need to be fetched remotely for a column.

note

This also is used by both PermittedValues and EditLookUpValues properties of User Interface Config.

Definition

The handler recieves the Adaptable Column in question and returns an array of values to be displayed:

handler: (column: AdaptableColumn) => any[];

Example

// Predefined Config
export default {
UserInterface: {
EditLookUpItems: [
{
Scope: {
ColumnIds: ['counterparty'],
},
GetColumnValuesFunction: 'GetLatestCounterparties',
},
],
PermittedValuesItems: [
{
Scope: {
ColumnIds: ['status'],
},
GetColumnValuesFunction: 'GetStatusValues',
},
],
},
} as PredefinedConfig;
// Adaptable Options
const adaptableOptions: AdaptableOptions = {
userFunctions: [
{
name: 'GetStatusValues',
type: 'GetColumnValuesFunction',
handler(column: AdaptableColumn) {
return ['Rejected', 'Pending', 'Active'];
},
},
{
name: 'GetLatestCounterparties',
type: 'GetColumnValuesFunction',
handler(column: AdaptableColumn) {
return mockServer.getCounterparties();
},
},
}