Главная страница | назад





Article #17551: Datasource events

 Question and Answer Database
FAQ2551C.txt Datasource events
Category :VCL
Platform :All
Product :C++Builder 3.x
Question:
With all data sources in a datamodule, how can the form receive the
datasource events so that we can for example enable/disable the save buttons
on the form when the state of the data source changes.
Answer:
Define an event handler on your form and set the event from the datasource
to your event handler. You should note that for the life of your form
anything that accesses the datasource will trigger your event handler, so
you should probably manually instantiate your form and display it as a
modal form. Also, you need to reset the event when you destroy your form.
7/2/98 10:32:32 AM

Last Modified: 01-SEP-99