Form editable-grid

Hello at all,

i have a master-detail form where detail is a Editable.grid, i have a javascript routine  where i do calculation , and is ok, 
but the problem is calculation shift the row and not remain on the same record or the same column ....

I tried to do the focus, but nothing ..

there is a method to remain on the same field ?

thank very much