下面的程序可以得到,试试吧:
procedure TForm1.DBGrid1KeyUp(Sender: TObject; var Key: Word;
Shift: TShiftState);
var i: byte;
begin
for i := 0 to DBGrid1.ControlCount - 1 do
if DBGrid1.Controls is TInPlaceEdit then
begin
with DBGrid1.Controls as TInPlaceEdit do
begin
Edit1.Text := Text;
end;
end;
end;