Weird behavior of TCRDBGrid

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
97itr217
Posts: 19
Joined: Tue 31 Mar 2009 14:54
Location: Canada

Weird behavior of TCRDBGrid

Post by 97itr217 » Tue 15 Dec 2009 21:27

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?

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Wed 16 Dec 2009 08:27

I can not reproduce the problem.
Try to compose a small sample to demonstrate the problem and send it to dmitryg*devart*com.

97itr217
Posts: 19
Joined: Tue 31 Mar 2009 14:54
Location: Canada

Post by 97itr217 » Wed 16 Dec 2009 17:16

Sample app sent.

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Thu 17 Dec 2009 15:04

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.

Post Reply