I would like to see the line delimited list of columns in my FORM dg ...?

thx
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Code: Select all
on mouseUp
## Get the datagrid data, which is an array:
put the dgdata of grp "your datagrid here" into tData
## We use the KEYS of that array (1 to N), which is a CR delimited list, for the following loop
put the keys of tData into tKeys
## we use tis variable for the text list:
put empty into tTextList
## here we create a simple (test) TAB and CR delimited list from the array data
repeat for each line tKey in tKeys
put tData[tKey]["column 1"] & TAB & tData[tKey]["column 2"] & TAB & tData[tKey]["column 3"] & CR after tTextList
end repeat
## get rid of trailing CR
delete char -1 of tTextList
## Now display list in a field
put tTextList into fld "whatever"
end mouseUp