Change row on event

Hi at all

It’s possible when change a filed, into a multiple records grid in insert mode, to position the cursor on the new row on a specific field ?

example:

barcode field on change this field automatically the others fields are populated and i want that the cursor will positioned on new row to insert.

thanks in advanced
Fabio

[QUOTE=manzonif;15588]Hi at all

It’s possible when change a filed, into a multiple records grid in insert mode, to position the cursor on the new row on a specific field ?

example:

barcode field on change this field automatically the others fields are populated and i want that the cursor will positioned on new row to insert.

thanks in advanced
Fabio[/QUOTE]
sorry , what does the barcode field mean ?

I’m not sure, but you could try to use sc_set_focus macro to do that. I assume that the barcode field is just an edit field which will change into a barcode?

Hi Fabio
you need some javascript to do that

Assuming ‘barcode’ is the name of the field:

function sc_barcode_onchange()
{
var n = F1.elements[“sc_contr_vert”].value;
n = (n - 1);
findPos(this);
nm_atualiza_line(‘incluir’, n);
}

and on event onLoad

sc_set_focus( ‘barcode’ );

Hope this help

so, er…it’s maybe

Ciao Giorgio
Ho letto solo ora la tua risposta e tra tutte ? sicuramente quella che pu? funzionare
il mio problema ? che non conosco javascript, leggendo la funzione non mi sono chiare 2 o 3 cosette
magari tu potresti spiegarmele senza tanti sforzi
ci provo
F1 ?
[“sc_contr_vert”]
nm_actualiza_line(‘incluir’)
queste tre cose non riesco a decifrarle se potessi aiutarmi te ne sarei grato
ciao
Fabio

Hi Fabio

these functions are not documented and the purpose is to identify in wich row you are. After that you must “emulate” a new insert thru the function nm_actualiza_line(…)
The code must be implemented on the onChange event of the field.
Send me a private message for other info in italian :wink: