SMART datagrid v.1 > Classes > CalculatedColumn

Back  Forward

DataLudi.CalculatedColumn.cached  property

If it is true, it will reuse after storing the value returned from valueExpression or valueCallback

If need to recalculate, the grid will recalculate and store it. If it is false, it will recalculate whenever the value is requested. 

Defaults to false.

Getter
function cached(): Boolean
Setter
function setCached(value: Boolean)
Note
Code -1
    grid.setColumns([{
        name: "colAmount",
        type: "calced",
        valueExpression: "unit_price * quantity",
        cahced: true
    },
        ...
    ]);
See Also
valueExpression
valueCallback
calcBounds
calcRange
Examples
Calculated Column
Total Calculated Columns