SMART datagrid v.1 > Classes > ValueColumn

Back  Forward

DataLudi.ValueColumn.mergeValueExpression  property

Expression which calculates the value to be displayed in merged cell. 

If do not set this expression or mergeValueCallback, it will display the value of first cell being included in merging. If mergeValueCallback is set by a valid function, this property will be ignored. 

In the table below, it has listed the variables which can be used in the expression. 

Defaults to null.

Getter
function mergeValueExpression(): String
Setter
function setMergeValueExpression(value: String)
Table-1  ValueColumn.mergeExpression variables
VariableExplanation
valueThe value of field.
valuesThe value of other fields. ex) "values['quantity'] + values['price'] > 1000000"
rowThe number of grid row.
datarowThe number of data row.
checkedIf grid row is checked state, it will be true.
Code -1
    var col = grid.columnByName('salary');
    col.setMergeValueExpression('value + values["dept"]');
See Also
mergeValueCallback
mergeExpression
mergeCallback
Expression Overview
Examples
Cell Merging