Carriage Return in datagrid data
Michael Doub
mike at doub.com
Wed Jan 4 17:05:05 EST 2012
Let say we have a variable Contacts where each line has 4 tab delimited fields: RecID, Name, Age, BirthDay
The following builds the dgData array. The first index controls the order of what is displayed in the datagrid.
If you look closely you will see that it[Counter] = pDataArray that you deal with in the Row Behaviour script.
Hope this helps,
Mike
Global Contacts
on openCard
local x;
local Counter; put 1 into counter
put empty into it
set itemdel to tab
repeat for each line x in Contacts
put item 1 of x into it[Counter]["RecID"]
put item 2 of x into it[Counter]["Name"]
put item 3 of x into it[Counter]["Age"]
put item 4 of x into it[Counter]["Birthday"]
add 1 to counter
end repeat
set the dgData of group "SetGroup" to it
More information about the use-livecode
mailing list