Link to home
Start Free TrialLog in
Avatar of SingBabys
SingBabys

asked on

How can I Copy the content in a cell of dxDBGrid to clipboard?

The dxDBGrid is in Browse state,but I want to copy the contents of a cell to clipboard.

How can I do?
Avatar of SingBabys
SingBabys

ASKER

I'm waiting for the answer.
Avatar of kretzschmar
usual u use directly the dataset which is assigned to the grid for this

a sceleton

implementation
{$R *.DFM}

uses Clipbrd;
var AClipBoard : TClipBoard;

procedure TForm1.Button1Click(Sender: TObject);
begin
  AClipBoard.AsText := Dataset.FieldByName('FieldNameYouWant').AsString;
end;

initialization
  AClipBoard := TClipBoard.Create;
finalization
  AClipBoard.Free;
end.

meikl ;-)
ASKER CERTIFIED SOLUTION
Avatar of nestorua
nestorua

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ClipBoard is a global object and doesn't need to be created
about dxDBGrid .. forgot it's methods and properties .. been using cxGrid (ver 4+) since it came out