SMART datagrid v.1 > Classes > DataSet

[ grids ver.1.3.0]   Back  Forward

DataLudi.DataSet.recalcRows  method

Recalculate the value of Derived Fields

Only when the value of common fields is changed, the value of Derived Field will be calculated automatically. However, when calculate the value by DerivedField.callback, or since rowTag is contained in Expression, you should recalculate even if the value of common fields are not changed, you can call this method. 

function recalcRows (rows: Integer|TreeDataRow|Array);
Returns
Void
Parameters
rows - Integer|TreeDataRow|Array.
It specifies as data row number, Tree Row Object or array of them. If specify null or undefined, it will recalculate all rows.
Code -1
    var row = grid.focusedDataIndex();
    ds.setRowTag(row, '10000');
    ds.recalcRows(row);
Code -2
    // Recalculate all rows.
    ds.recalcRows();
Code -3
    var rows = grid.getSelectedDataIndices();
    ds.recalcRows(rows);
See Also
DataSet.getRowTag
DataSet.setRowTag
DataSet.getRowsByTag
DataSet.setRowTags
DataSet.unsetRowTags
DerivedField
Examples
Derived Field & Row Tags