SMART datagrid v.1 > Classes > ValueColumn

Back  Forward

DataLudi.ValueColumn.mergeCallback  property

Callback function which returns the reference value of determining whether to merge cells. 

function (row:GridRow, column:Column):*;

If the value returned by this function is the same as the one returned by the prior row, it will be merged with the prior row. 

If this property is set by a valid function, mergeExpression property will be ignored. 

Defaults to null.

Getter
function mergeCallback(): Function
Setter
function setMergeCallback(value: Function)
Code -1
    var col = grid.columnByName('salary');
    col.setMergeCallback(function (row, column) {
        // If it is the case of exporting this grid to the report,
        // you must refer the grid regionally as below rather than the variable beyond this callback region.
        return column.grid().getValueAt(row, column.dataIndex());
    });
Note
See Also
mergeExpression
mergeValueExpression
mergeValueCallback
Examples
Cell Merging