Unsaved changes

I am currently looking to call an alert function if any unsaved changes. Is there any method for the grid, that returns a boolean to indicate there are unsaved changes in the grid?

You may try to use the getChangedRows() for the grid:
https://docs.dhtmlx.com/api__dhtmlxgrid_getchangedrows.html
Or in case of a dataProcessor component usage you may use the getState() method:
https://docs.dhtmlx.com/api__dataprocessor_getstate.html