Refresh grid after inserting data from a form

Hello we have this structure:

DASHBOARD with 2 widgets.

The first widget has a grid.

The second widget has a form.

I want to refresh the grid when a new data is inserted in the form of the widget2.
In onAfterInsert I have put this code but it gives error on screen.
nm_gp_submit_ajax (‘equals’, ‘breload’);

Thanks.

in the OnAfterInsert you cannot call directly the nm_gp_submit_ajax function, I guess is a javascript function, call it via this function

sc_ajax_javascript( ‘JavascriptMethodName’, array(“parameter”))