سلام
private
{ Private declarations }
ACombo: TComboBox;
...
procedure TForm1.DBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect;
DataCol: Integer; Column: TColumn; State: TGridDrawState);
begin
if (gdSelected in State) then
begin
if (UpperCase(Column.Field.FieldName) = UpperCase('serial')) then
begin
ACombo.Top:= Rect.Top;
ACombo.Left:= Rect.Left;
ACombo.Width:= Rect.Right - Rect.Left;
ACombo.Text := Column.Field.Value;
ACombo.Visible := True;
ACombo.SetFocus
end;
end;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
ACombo:= TComboBox.Create(Self);
ACombo.Parent := DBGrid1;
ACombo.Visible:= False;
end;