AdvStringGrid - testing whether contents have been changed programmatically

Hi, my code updates the contents of various AdvStringGrids programmatically. Is there any way that my code can check whether the contents of a grid have been changed? I want to have a 'Save' button on my app which is only enabled if the contents of a grid have changed. (I thought that I could use the 'Modified' boolean but that only seems to be set if a value is changed through the user interface.

Many thanks, Andrew

TAdvStringGrid v9.1.4
Embarcadero® C++Builder 12 Version 29.0.53982.0329

It is by design that programmatic changes to grid cell data is not affecting the Modified property.
If code changes a value, your code knows and there is no need for a detour via a property or event.
With this design, you can also easily track the difference between programmatic changes & UI invoked changes in your application.

Hi Bruno, thanks for your reply. Our application has several hundred lines of code that programmatically update string grids, and it will be quite a lot of effort to update it for each of these. I was hoping there would be an alternative way of detecting whether the contents of a grid had been changed. Can you think of a solution to this problem?

Thanks, Andrew

You could make a wrapper method for setting grid cells where you manage your modified flag from this wrapper method