SMART datagrid v.1 > Classes > GridDataSet

[ grids ver.1.3.5]   Back  Forward

DataLudi.GridDataSet.setValueEx  method

Change the value of field which is specified by field of data row corresponding to rowIndex location. 

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

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