And of course you need to memorize the data BEFORE you delete it, afterwards is too late, don't you think?
Delete script:
Code: Select all
...
## What line is selected:
put the dghilitedline of grp "datagrid" into tLine
## Now fetch the DATA in this line and store it in a variable:
put the dgDataOfLine[tLine] of grp "Your datagrid here" into tData
## tData now contains the complete row: Merke TAB Modell TAB KM TAG Pris
## If you do not need all of the columns, get the one you want to save in "sold cards"
## Set itemdel to TAB
put item 1 of tData into tMerke
put item 2 of tData into tModell
put item 3 of tData into tKM
put item 4 of tData into tPris
## Now store the info you need:
put CR & tMerke after fld "sold cars"
## if not on the current card, add the exact "address: ... of cd "the card with that field of sold cars"
## Or if you have another datagrid with the same columns as the first one use:
## dispatch "AddLine" to group "Your datagrid here" with tData
## Now we can delete that line from datagrid:
dispatch "deleteLine" to grp "datagrid" with tLineNumber
...