Topic: how oen files ??

how can we open doc, xls, pdf.. files by double clicking the table grid ?

Re: how oen files ??

procedure Form1_TableGrid1_OnCellDoubleClick (Sender: TObject; ACol, ARow: Integer);
begin
        OpenFile('your file');
end;

Domebil

Re: how oen files ??

Hi v_pozidis, domebil,
Please see attached as one way of doing it.
In the example, just single click on the cell that you want to open a file for (you can also use doubleclick if you prefer);  the files are just samples to show how it's done.
Column 0 is used to highlight a row for editing or deleting in the usual way.
Derek.

Post's attachments

Attachment icon pozidis gridclick.zip 830.15 kb, 257 downloads since 2020-06-02 

Re: how oen files ??

almost what I was asking.
in your example how can I open by double click the table grid a pdf file or xls ,doc... ?

Re: how oen files ??

Hi,
Just change the calling procedure from 'oncellclick' to 'oncelldoubleclick' (see attached).
Derek.

Post's attachments

Attachment icon pozidis gridclick.zip 830.81 kb, 336 downloads since 2020-06-02