DataGrid Form Repeat FillInData problem (Database)
Posted: Sat Feb 20, 2016 9:35 pm
Hello, I am sure I am missing something simple with this, but hope someone could guide me in correct direction:
I get my result from the database which I verified is working correctly. I then use the following code in my card script:
I confirm that the Array is being built correctly, the issue is filling it in on the form. It is creating each record on the form, but only the static fields are coming thru (template).
My group row template matches the above values as well.
I have this code in the Row Behavior:
Any help would be appreciated, thanks.
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