SMART datagrid v.1 > Classes > DataColumn

Back  Forward

DataLudi.DataColumn.lookupKeyFields  property

When setting lookup source through lookupSourceId, it will specify field list which will get the key values transferred by lookup source as array. 

Defaults to null.

Getter
function lookupKeyFields(): Array
Setter
function setLookupKeyFields(value: Array)
Code -1
    // Add lookup table,
    var id = grid.addLookupSource({
        "id": "products",
        "levels": 2,
        "keys": [
            ["Customer1", "Import"],
            ["Cusotmer2", "Export"],
            ...
        ],
        "values": [
            "Product 1",
            "Product 2",
            ...
        ]
    });
    // and set lookup information in column.
    column.setLookupSourceId(id);
    column.setLookupKeyFields(['customer', 'flow']);
See Also
lookupSourceId
Data Lookup Overview
LookupSource
LookupTree
GridBase.addLookupSource
Examples
Data Lookup