dunbarx wrote: ↑Wed Aug 19, 2020 7:49 pm
Similarly, a DG is a whole lot of controls and behaviors, all assembled into an overarching group. But only the group will "see" messages unless you explicitly send that message to a control within the group.
Craig
Thanks guys, for something like the DG it can get complicated quickly. Anyway, after a long coffee break and a bite to eat I came back, decided to open up the script for the DG (right click on the DG, select edit script), plonked the code in there and it worked. So, the button was able to "reach" the datagrid to execute some code, but could not reach the form behaviour script. It would be nice to have a visual I guess, so we could see where are all the objects are and what is in the path of what. I never did comprehend that which I suspect is a barrier to my truly "getting" livecode. Nevertheless this is working, sort of

Once I got the new rows added and I am doing this all manually, probably breaking all the DG rules, I lost the ability to re-order rows. You can pick them up and drag them around ok, but they don't really shuffle everything else around them like they used to. I was just reading up on AddData and I suspect that is the direction I will need to go.
pDataArray is an array of custom data to add to the data grid and pLine is the line number where it should be added. All data appearing at or after pLine will be shifted down 1. You will not overwrite any data. If pLine is empty then the data will be added to the end of the existing data.
If the data is successfully added then the index of the data will be returned in the result, otherwise an error is returned.
I'll let you know how it goes.
Cheers,
M