I'm hoping I understand what you area asking..
When you -- put the dgdata of grp "tmpldatagrid" into thedataB
you end up with an array like this..
thedatab[1]
[column] data
[another column] data
theDataB[2]
[column] data
[another column] data
etc..
So when you -- put thedataB["data"] into tdata
tData will most likely be empty because there is no first level key named "data"
In order to do what I _think_ you want to do, you'll need a repeat loop.. Something like the following.
Code: Select all
put the keys of theDataB into tKeys
repeat for each line tLine in tKeys
-- this assumes the second datagrid has a column named "data" to match the first datagrid
put theDataB[tLine]["data"] into theDataA[tLine]["data"]
end repeat
This will create a numerically keyed 2 level array with the data you need at which point you can -- set the dgdata of group "myOtherDatagrid" to theDataA
If I'm wrong about what you are trying to accomplish here, my apologies.
tusa wrote:Hello everybody.
I have the attached datagrids as you can se.
When I press a button my different data gets in the sequenze to the right, exept the 2 lines of data in the litlle datagrid.
I use this piece of code:
Code: Select all
put the dgData of group "tmpldataGrid" into theDataB
put theDataB["Data"] into tData
put tData into theDataA["Data"]
I need the 2 lines, or more, if data is written, to be stored ind the column data, seperated with fx. vertical line.
Best regards Tue.