Page 1 of 1

Weird behavior of TCRDBGrid

Posted: Tue 15 Dec 2009 21:27
by 97itr217
Not sure if this is due to TCRDBGrid or BDS in general.
IDE : BDS 2006
MyDAC : v5.55.0.39
Windows : XP + SP3

I have my own frame (say frameWithGrid) with a TCRDBGrid inside it. There is an OnCellClick event (frameWithGridGridCellClick) which toggles a checkbox.

If I drop this frame onto a form (say formHasFrame) as is without overriding the OnCellClick event (ie: no code for formHasFrameGridCellClick event), my check box on the frame will be toggled properly.

However if I write code for formHasFrameGridCellClick() and later remove the code (by emptying the entry in the property explorer), the cell click event is not fired at all, resulting that the OnCellClick event in the ancestor being ignored. Looking at the dfm file I discovered that there is a line 'OnCellClick = nil' for formHasFrame. If I remove this line from dfm, the cell click event is fired properly again (thus running code in the ancestor).

I have not tested other vcl components but I would expect emptying an event from the property explorer would have removed all override event code and fall back onto the ancestors' event code. Is it not?

Could any guru verify this?

Posted: Wed 16 Dec 2009 08:27
by Dimon
I can not reproduce the problem.
Try to compose a small sample to demonstrate the problem and send it to dmitryg*devart*com.

Posted: Wed 16 Dec 2009 17:16
by 97itr217
Sample app sent.

Posted: Thu 17 Dec 2009 15:04
by Dimon
This problem is connected with specific working of C++Builder BDS with frames, but not with TCRDBGrid. If you do the same steps with the Label1 component, you will see the same effect.