Hi, All, Apex20.1 here
it seems I can't get the sum of one IG column right , here is the setup ( I got a very simple IG on apex.oracle.com and was able to reproduce IG model data problem).
in column "Quantity", a DA with change event fires up this JS code:
apex.item("CPRICE").setValue( apex.item("CQTY").getValue()* 4 );
in Column 'Unit Price", a DA with change runs this code:
var model = apex.region("IG_ITEMS").widget().interactiveGrid("getViews", "grid").model;
var n_sal, n_totsal = 0;
col_salary = model.getFieldKey("UNIT_PRICE");
model.forEach(function(igrow) {
n\_sal = parseInt(igrow\[col\_salary\], 10);
if (!isNaN(n\_sal)) {
n\_totsal += n\_sal;
}
});
$s("P1_TOT", n_totsal);
It seems the model still rememberers its previous data after its value is set by Quantity Change DA( Quantity * 4), the screen data looks right but not model data, I really got lost and don't know why , more importantly how can I get an interactive sum of an IG column for something like dollar total? please enlighten me.
