I get my result from the database which I verified is working correctly. I then use the following code in my card script:
Code: Select all
repeat for each line tmyLine in tRecords
add 1 to theLine
put item 1 of tmyLine into theDataA[theLine]["Var1"]
put item 2 of tmyLine into theDataA[theLine]["Var2"]
put item 3 of tmyLine into theDataA[theLine]["Var3"]
dispatch "AddData" to group "DataGrid 1" with theDataA, theLine
put the result into theNewIndex -- integer if successful, error string otherwise
end repeat
My group row template matches the above values as well.
I have this code in the Row Behavior:
Code: Select all
on FillInData pDataArray
set the text of field "Var1" of me to pDataArray["Var1"]
set the text of field "Var2" of me to pDataArray["Var2"]
set the text of field "Var3" of me to pDataArray["Var3"]
end FillInData
Code: Select all
on LayoutControl pControlRect
local theFieldRect
set the rect of graphic "Background" of me to pControlRect
end LayoutControl