DataGrid with Form not Refreshing on Add

I have a simple DataGrid with form. When I click the "Add" button, fill in the form and then press "Save", I get a notification saying that the record was added but the grid does not refresh to show me the newly added record. If I want to see the newly added record I need to refresh the browser. Is there a way to automatically refresh the grid?

Hi @rbock,

You can add the following code in the Then handler of the createXXX method inside the Submit event of the form ${getOrdersResult} = [${result}, ...${getOrdersResult}]. Here getOrdersResult is the name of the property to which your DataGrid's Data property is set (it follows the naming convention getXXXResult where XXX is the name of the database entity).

This will insert the new item at the top of the DataGrid.

I see where you are going with that but I do not have a Submit event - only the ones shown below.

The Submit event it's on the TemplateForm component.