SMART datagrid v.1 > Classes > DerivedField
Callback function which returns the value to be saved in field.
values is the array in which has saved the values of common field. source is the index of one field which has enabled to call this callback by GridDataSet.setValue or TreeDataSet.setValue. temp is transferred as true when calling this callback during editing grid row. You can also return the value by expression expression property instead of this callback function. (source and temp are in ver 1.3)
Defaults to null.
var fields = [];
var calcedFields = [
{
fieldName: "amount",
callback: function (ds, fld, row, values) {
return values[9] * values[10];
}
},
...
];
ds.setFields(fields, calcedFields);