SMART datagrid v.1 > Classes > DataColumn

Back  Forward

DataLudi.DataColumn.lookupSourceId  property

The ID of object which will be used as Lookup source of this column among LookupSource objects registered as Lookup source in Grid

If lookupDisplay is true and this property value specifies one of LookupSource objects which have been registered in grid actually, the data cells of this column will use the value transferred by LookupSource.lookup rather than the value of original field to display the cell. The key values which will be transferred by lookup source are imported from the fields set in lookupKeyFields

LookupTree is the currently implemented LookupSource. Please refer to LookupSource help topic and Data Lookup Overview topic. 

Defaults to null.

Getter
function lookupSourceId(): String
Setter
function setLookupSourceId(value: String)
Code -1
    var id = grid.addLookupSource({
        "id": "products",
        "levels": 2,
        "keys": [
            ["Customer1", "Import"],
            ["Customer2", "Import"],
            ["Cusotmer2", "Export"],
            ["Cusotmer2", "Export"],
            ...
        ],
        "values": [
            "Product 1",
            "Product 2",
            "Product 3",
            "Product 4",
            ...
        ]
    });
    column.setLookupSourceId(id);
    column.setLookupKeyFields(['customer', 'flow']);
See Also
lookupKeyFields
labelField
Data Lookup Overview
LookupSource
LookupTree
GridBase.addLookupSource
Examples
Data Lookup