先把memo的DragMode属性设置为dmAutomatic在memo的OnDragDrop事件和OnDragOver写上代码:procedure TForm1.Memo1DragDrop(Sender, Source: TObject; X, Y: Integer);var I: Integer; Grid: TDBGrid; DataSet: TDataSet;begin Grid := TDBGrid(Source); DataSet := TDataSet(Grid.DataSource.DataSet); for I := 0 to Grid.SelectedRows.Count -1 do begin DataSet.GotoBookMark(Pointer(Grid.SelectedRows)); memo1.lines.add(DataSet.Fields[0].AsString); end;end;procedure TForm1.Memo1DragOver(Sender, Source: TObject; X, Y: Integer; State: TDragState; var Accept: Boolean);begin Accept := Source is TDBGrid;end;最后,由于DBGrid可拖动时,就不能选择记录,能选择记录就不能拖动,这是矛盾的。所以只能是加上按键来判断是否可拖动,例如以下实现按住shift键不放时可以拖动:procedure TForm1.DBGrid1KeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);begin if Key = VK_SHIFT then DBGrid1.DragMode := dmManual;end;procedure TForm1.DBGrid1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);begin if Key = VK_SHIFT then if DBGrid1.SelectedRows.Count > 0 then DBGrid1.DragMode := dmAutomatic;end;