SMART datagrid v.1 > Classes > TreeDataSet

[ grids ver.1.3.5]   Back  Forward

DataLudi.TreeDataSet.setValueEx  method

It changes the value of field which has been specified by field of data row. 

You can specify field index or field name in field. And, differently from setValue, if checkDiff is not true, It will store the value and fire change event regardless of whether it has actually changed. 

function setValueEx (row: Integer|TreeDataRow, field: Integer|String, value: *, checkDiff: Boolean, strictDiff: Boolean);
Returns
Void
Parameters
row - Integer|TreeDataRow. required.
field - Integer|String. required.
value - *. required.
checkDiff - Boolean. Defaults to false.
strictDiff - Boolean. Defaults to false.
Code -1
    var index = tree.focusedIndex();
    if (index.isDataCell(tree)) {
        var value = $('#salary').val();
        // It stores the value and fires change event regardless of whether it has actually changed.
        ds.setValueEx(index.getDataIndex(tree), index.getDataField(), value);
    }
See Also
setValue
getValue
GridBase.focusedIndex
CellIndex.getDataIndex
Examples
Tree Data Set