Using DataGrid - setAfterCommitHandler

I have a browser table where I have the following code to refresh the browser screen content after create/update in Edit screen:

salesOrdersTableEdit.setAfterCommitHandler(entity -> salesOrdersDs.refresh());    

While I am replacing the table with dataGrid (need it!), and wanted to have the same date refresh that I have used for the browser screen with Table above, it seems that the AfterCommitHandler is not supported in DataGrid. Is this correct or there is an alternative way?

Thanks for your help.

Hi,

As far as I see, your code isn’t directly related to the table (except the fact that the action is defined within the table), so you’re just using an action to refresh a datasource, i.e. this code should work for a DataGrid either. If something doesn’t work, please be more specific about what’s broken.

Regards,
Gleb