Adding ComboBox to StringGrid (or DrawGrid)

Hello,

I want to add some Comboboxs into a StringGrid instead of a strings.
Unfortunately it does not work in the way I want to.

If I'm scolling down it works fine but as soon as I scroll back it's not
working anymore. And the second problem is that I can not open the dropdown
list (I already changed the parent of the ComboBox but than I have a drawing
problem with the last visible ComboBox with may not fit completely into the
StringGrid ).

Does somebody know the solution for this problem? Some source code would be
nice.

Thanks and best regards
Michael Kuhl

PS: my source code:

unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  Grids, StdCtrls;

type
  TForm1 = class(TForm)
    StringGrid1: TStringGrid;
    procedure StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer;
      Rect: TRect; State: TGridDrawState);
    procedure FormCreate(Sender: TObject);
    procedure FormDestroy(Sender: TObject);
  private
    { Private-Deklarationen }
    cbx : array of TComboBox;
  public
    { Public-Deklarationen }
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.FormCreate(Sender: TObject);
var i : Integer;
    Rect      : TRect;
begin
try
  SetLength(cbx, 10);
  StringGrid1.DefaultColWidth  := 150;
  StringGrid1.DefaultRowHeight := 19;
  StringGrid1.Width    := 330;
  StringGrid1.Height   := 140;  // --> so I will get a scrollbar
  StringGrid1.RowCount := 11;
  StringGrid1.ColCount := 2;
  for i := 0 to 9 do
    begin
      StringGrid1.Cells[0, i+1] := IntToStr(i);
      cbx[i] := TComboBox.Create(nil);
      StringGrid1.Objects[1, i+1] := cbx[i];
      cbx[i].Parent := StringGrid1;
      // cbx[i].Parent := Form1;
      cbx[i].Style := csDropDownList;
      rect := StringGrid1.CellRect(1, i+1);
      cbx[i].BoundsRect := rect;
      // cbx[i].Top := StringGrid1.Top + rect.Top;
      // cbx[i].Left := StringGrid1.Left + rect.Left;
      cbx[i].Items.Add('Item 1 - '+ IntToStr(i));
      cbx[i].Items.Add('Item 2 - '+ IntToStr(i));
      cbx[i].ItemIndex := 0;
    end;
  except
  end;
end;

procedure TForm1.FormDestroy(Sender: TObject);
var i : Integer;
begin
  for i := 0 to 9 do
    begin
      cbx[i].Free;
    end;
  SetLength(cbx, 0);
end;

procedure TForm1.StringGrid1DrawCell(Sender: TObject; ACol, ARow: Integer;
  Rect: TRect; State: TGridDrawState);
begin
  if StringGrid1.Objects[ACol, ARow] is TComboBox then
    begin
      cbx[ARow-1].BoundsRect := rect;
      // cbx[ARow-1].Top := StringGrid1.Top + rect.Top;
      // cbx[ARow-1].Left := StringGrid1.Left + rect.Left;
    end;
end;