form integration of grid and javascript submit

apologies if this is a redundant request, but I received no confirmation or reply to my question yesterday.

I have integrated a grid in a form, and it works just as expected when I use a standard html submit button. But if I try to use javascript to submit the form from a function using document.forms[‘myform’].submit() the submit request will not include any changed grid values. Is there a workaround for this?

Thanks you. … m%20submit

If you submit form by javascript , be sure to add next js call

mygrid.parentFormOnSubmit(); //prepare grid for data sending
form.submit(); //submit form