I created a field “total” with “add custom file” that calculates ‘prz’ * ’ Qnt’
{ // keys = event types, values = handler functions
“change keyup”: function(e) {
var $row = $(this).fields();
var st = $row[“Prezzo”].toNumber()*$row[“Quantita”].toNumber();
$row[“Importo_Riga_Ord”].value(st); // assigncon in add
works properly while in “add record”.
with “editrecord” the field “total” remains value 0 to recalculate the field I have to insert new data on the field “Qnt” ; how can i make a refresh custom field “total” to bring back thetotal correct ??
For “Edit Page”, you may simply use “Row_Rendered” server event in order to re-calculate the total by assigning the “EditValue” property of that custom field, for example:
if (CurrentPageID() == “edit”) { // make sure only for Edit Page
// assume all these following three textboxes are enabled in Edit mode/page
$this->total->EditValue = intval($this->Prezzo->EditValue) * intval($this->Quantita->EditValue);
}