Why a grid bound to a TMSQuery refreshed periodically?
Posted: Mon 13 Jan 2014 09:28
I noticed a nice behavior in my application. I have a devexpress quantum grid (somehow a powerful TDBGrid), it is linked with a TDataSource to a TMSQuery.
I try to make an example.
Imagine the TMSQuery is a SELECT * FROM CUSTOMERS.
Once the query is opened I see all the customers in the grid (Form A).
Now if from a customer detail form (Form B)i change a value (like "Devartz" to "Devart") after some seconds (usually 30-60, i cannot tell exactly how many) i see that the grid in Form A is updated ("Devartz" to "Devart").
Could you please help me in understanding how this works?
I suspect (but I am not sure) that TMSQuery every X seconds notifies all DataSources that some data has changed.
May be i am wrong, but for sure there is a reason, could you please help me in finding it?
I try to make an example.
Imagine the TMSQuery is a SELECT * FROM CUSTOMERS.
Once the query is opened I see all the customers in the grid (Form A).
Now if from a customer detail form (Form B)i change a value (like "Devartz" to "Devart") after some seconds (usually 30-60, i cannot tell exactly how many) i see that the grid in Form A is updated ("Devartz" to "Devart").
Could you please help me in understanding how this works?
I suspect (but I am not sure) that TMSQuery every X seconds notifies all DataSources that some data has changed.
May be i am wrong, but for sure there is a reason, could you please help me in finding it?