SMART datagrid v.1 > Classes > DataColumn

Back  Forward

DataLudi.DataColumn.lookupValues  property

If one or more values are set in this property and the values as much as the number are set in lookupLabels, when the item of this property corresponding to the value of data cell exists, lookupLabels value of that location will be used to display data cell. 

If no corresponding value of this property or insufficient number of lookupLabels, the orginal value of data cell will be used. 

Please refer to Data Lookup Overview topic about the overall contents on lookup. 

Defaults to null.

Getter
function lookupValues(): Array
Setter
function setLookupValues(value: Array)
Code -1
    $('#setLookup').click(function () {
        column.setLookupDisplay(true)
              .setLookupValues([111, 222, 333])
              .setLookupLabels(['aaa', 'bbb', 'ccc']);
    });
    // In most cases, it will be set when setup grid column.
    grid.setColumns([
        {
            name: 'col1',
            lookupDisplay: true,
            lookupValues: [],
            lookupLabels: [],
            ...
        }
    ]);
See Also
lookupDisplay
lookupLabels
labelField
Data Lookup Overview
Examples
Data Lookup