11-21-2019, 07:03 PM
Hi Bizbuzz,
I haven't used the datagrid much, this might've been my first time using it, but after tinkering for a bit I have the following script to populate a datagrid from a Livecloud array:
I set the row height to 70 and the column names to the table keys through the property inspector before running the code above. The row height stayed the same after running the code. I might be missing something. If you have a sample stack, I can take a look at it.
I haven't used the datagrid much, this might've been my first time using it, but after tinkering for a bit I have the following script to populate a datagrid from a Livecloud array:
Code:
on mouseUp
local tKeys, tOutputA, tCount, tDataA
set the dgData of group "datagrid" to empty
put cdb_tableKeys("testTable") into tKeys
put cdb_read("testTable", "*", "cloud") into tOutputA
put 0 into tCount
repeat for each key xRecordID in tOutputA
add 1 to tCount
put tOutputA[xRecordID]["cdb"]["cdbRecordID"] into tDataA[tCount]["recordID"]
repeat for each item xKeyName in tKeys
put tOutputA[xRecordID][xKeyName] into tDataA[tCount][xKeyName]
end repeat
end repeat
set the dgData of group "datagrid" to tDataA
end mouseUp
I set the row height to 70 and the column names to the table keys through the property inspector before running the code above. The row height stayed the same after running the code. I might be missing something. If you have a sample stack, I can take a look at it.