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?
How can I do?
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('Field NameYouWan t').AsStri ng;
end;
initialization
AClipBoard := TClipBoard.Create;
finalization
AClipBoard.Free;
end.
meikl ;-)
a sceleton
implementation
{$R *.DFM}
uses Clipbrd;
var AClipBoard : TClipBoard;
procedure TForm1.Button1Click(Sender
begin
AClipBoard.AsText := Dataset.FieldByName('Field
end;
initialization
AClipBoard := TClipBoard.Create;
finalization
AClipBoard.Free;
end.
meikl ;-)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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
about dxDBGrid .. forgot it's methods and properties .. been using cxGrid (ver 4+) since it came out
ASKER