This topic is locked

Inline Edit with transformed values

12/18/2009 8:54:17 AM
PHPRunner General questions
A
aparicioj@gmail.com author

Hi
We're development one application for serveral countries when the sources information are serveral external application and, in our database ,all amounts are stored in cent.
I'm usign BeforeProcessRowList event in List Page to change cent values in decimal values. source code are below
$data["AM_CUOTA_MES_SERV"]=$data["AM_CUOTA_MES_SERV"]/100;

$data["AM_CUOTA_MES_PAGO_APLAZADO"]=$data["AM_CUOTA_MES_PAGO_APLAZADO"]/100;

$data["AM_CUOTA_MES_TOTAL"]=$data["AM_CUOTA_MES_TOTAL"]/100;
In the list page, decimal values are showing rigth, but whe we edit then in "InLine Edir" mode, the value showed in text box is the database value (AM_CUOTA_MES_SERV) instead of transformed value (AM_CUOTA_MES_SERV/100)
Is there any way to do that?
Thanks
Jose A.

J
Jane 12/22/2009

Jose,
use Edit page: Before display event to format values on the edit/inline edit.

Here is a sample:

global $control_AM_CUOTA_MES_SERV;

$control_AM_CUOTA_MES_SERV["params"]["value"] = $control_AM_CUOTA_MES_SERV["params"]["value"]/100;
A
aparicioj@gmail.com author 1/15/2010

Thanks Jane. It works fine !!!



Jose,
use Edit page: Before display event to format values on the edit/inline edit.

Here is a sample:

global $control_AM_CUOTA_MES_SERV;

$control_AM_CUOTA_MES_SERV["params"]["value"] = $control_AM_CUOTA_MES_SERV["params"]["value"]/100;