I have seen this problem a number of times but never determined the 'why' behind it - and ideally would like to prevent it happening again.
I make use of forms and datamodules, whereby a form will have a standard TDBGrid pointed to a TDataSource on an associated DataModule. On occasions if I open the form, then the datamodule, then close the DataModule (insider the IDE) the TDBGrid suddenly (sometimes) loses the DataSource property. Even if I then close all the files - the form and datamodule timestamps remain undchanged but the grid has now lost it's link.
Why would this happen ?
How can I prevent from tripping over this in the future ?
Usually I have the habit of opening the appropriate DataModule before opening the form - but sometimes I forget.
This isn't an issue I see every time I open the form / datamodule out of sequence but have seen it on occasion.
Anyone got any suggestions ?
Thanks in advance
Steve
I make use of forms and datamodules, whereby a form will have a standard TDBGrid pointed to a TDataSource on an associated DataModule. On occasions if I open the form, then the datamodule, then close the DataModule (insider the IDE) the TDBGrid suddenly (sometimes) loses the DataSource property. Even if I then close all the files - the form and datamodule timestamps remain undchanged but the grid has now lost it's link.
Why would this happen ?
How can I prevent from tripping over this in the future ?
Usually I have the habit of opening the appropriate DataModule before opening the form - but sometimes I forget.
This isn't an issue I see every time I open the form / datamodule out of sequence but have seen it on occasion.
Anyone got any suggestions ?
Thanks in advance
Steve