how to copy selected data from stringgrid


i couldn’t find the way to copy selected cell data from a stringgrid, i want the selected data string to be copied to Edit box if possible.. many thanks in advance.
im using delphi xe8, firemonkey.

what i tried so far..

A : Array of TValue;
procedure TForm1.Grid1GetValue(Sender: TObject; const Col, Row: Integer; var Value: TValue);
// Gets the value from a cell in the first column
if Col = 0 then
Value := A[Row];

procedure TForm1.Button2Click(Sender: TObject);
A[1] := Edit1.Text;

Comments are closed.