Dynamically adding controls to TDBCtrlGrid

Hello all,

When I add components to a TDBCtrlGrid dynamically (in D3), only the first row
gets painted initially. When I scroll the grid, the other rows then paint.
How can you add components to a TDBCtrlGrid dynamically, and have all rows
paint?

My code does the following, where AGrid is a TDBCtrlGrid added at
design time, and with datasource set etc.

AnEdit := TDBEdit.Create(AGrid);
AnEdit.Parent := TWinControl(AGrid.Controls[0]);
AnEdit.DataField := 'A_VALID_FIELD_NAME';

I have tried forcing the grid to repaint itself, by various means, but none
work. Does anyone know how I can do this?

Thanks in advance for your time
Angus

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own