0
votes

I have a custom page with a form and a grid. When a row from a grid is deleted, I want to update some other rows. I am therefore handling the rowdeleted event. I confirmed (through debugging) that the event is firing correctly and that the data is being updated correctly.

The only issue I have is that the screen still shows the old values. My delete row correctly disappears but the other rows do not get updated.

For each row that I change, I am calling the Update method of the Data View. However, this still does not refresh the user interface. Interesting, if I save, all my changes get correctly updated to the database. Which confirms that this is a UI isssue.

Is there any additional step that I need to perform to refresh the user interface? Or should I just avoid doing updates in Row Deleted event?

2

2 Answers

2
votes

To guarantee constant optimal performance level, in the end of a roundtrip grids in Acumatica only update currently selected record. This behavior is by default. In case you insert/update/delete other records in the same grid within an event handler or an action delegate, it's always necessary to call View.RequestRefresh() to force the grid to update its entire content instead of only the selected record.

0
votes

I managed to solve the issue by calling View.RequestRefresh(). However, I am not sure whether this is a standard practice. But I did find it used in several places in the Acumatica code