Datagrid detecting inline edits in progress

I have a page which has a DataGrid which supports inline edits on a select number of fields. The same page also has links to add and edit dialogs and a button to refresh the grid using

this.grid0.load();

Is there any way to detect if the DataGrid has any unsaved inline edits present. I'd like to put a warning on the refresh button to warn that any unsaved changes will be lost when you refresh.

Hi @markb,

The following expression will return true if there is any item currently in edit mode:

this.grid0.data.some(item => this.grid0.inEditMode(item))