I've got a datagrid form and have followed examples from the live code help/tutorial site. The dg form sorta looks like the way I want it, I'll need to do some tweaking to get it just the way I want, but I thin I can sort that out. I need help to format the data returned from a query so it goes into the dg form appropriately. I know the format of the output, however I don't know how to generate that type of output. Can someone help, if I list my code below. Label 2 is the title field and label 3 is the description field.
This is the code I have which works for a traditional table based datagrid.
Thanks all in advance.
Code: Select all
if (gConnID > 0) then
put "SELECT lineID, title, detail FROM myTbl WHERE ID =" && "'" & tID & "'" & "ORDER BY lineID" into tTheSQLQuery
put revDataFromQuery(tab, cr, gConnID, tTheSQLQuery) into tTheData
if tTheData begins with "revdberr," then
delete item 1 of tTheData
else
--Below works for a table based datagrid with two columns
--set the dgText[true] of me to "title" & tab & "detail" & cr & tTheData
--I need to have output like the following to get the dg form to populate
put "Lucky" into theDataA[1]["label 2"]
put "Day" into theDataA[1]["label 3"]
put "Dusty" into theDataA[2]["label 2"]
put "Bottoms" into theDataA[2]["label 3"]
lock screen
set the dgData of group "dg_lines" to theDataA
## Hilite first row
set the dgHilitedLines of group "dg_lines" to 1
unlock screen
end if
end if