Topic: Transfer Data from a Grid Row when doing a FORM.SHOW
Hi everybody
I don't know if this is an SQL or a SCRIPT.
I would like the users to double click a ROW on a GRID, and based on a variable (either 'Assess' or 'Todo') different Forms will open.
I got as far as I can open the appropriate FORM but I would also like the Data from the ROW of the GRID to also transfer.
========================================================
procedure fmTimeTable_TableGrid1_OnCellDoubleClick (Sender: TObject; ACol, ARow: Integer);
var
aba : string;
begin
aba :=SQLEXECUTE('SELECT DISTINCT ttCategory FROM dttimeTable WHERE id = ' +fmTimeTable.TableGrid1.sqlValue) ;
showmessage(ARow); //Test to see what acol and arow does...I know the answer lies with something to do with this.
if aba = 'Todo' then
begin
fmTodo2.show;
// carry over information from the selected ROW of the GRID to the form Requested fmTodo2
end
else if aba = 'Assess' then
Begin
fmTimeTableEntry.show;
// carry over information from the selected ROW of the GRID to the form Requested in this case fmTimeTableEntry.
end
end;
====== I think it has something to do with an SQL but also the ARow ?==========
Thanks for any help or guidence.