When the user change the data row and saved
the function $opt["edit_options"]["beforeSubmit"] = "function(post,form){ return validate_form_once(post,form); }";
It is perfect. But it's necessary show outside grid total sum.
this is my solutions.
$opt["edit_options"]["afterSubmit"] = "function(){ addsalegrid();return [true,''];}";
function addsalegrid()
{
numberform = "<?php echo $cid; ?>";//when the invoice number is diferent to ID record.
functionaddsale(numberform);//Show total outside the grid.
}
I hope to help everybody!
thank you Abu for your phpgrid!