[Datagrid] How to change an objects owner from a Datagrid to a Card

Kay C Lan lan.kc.macmail at gmail.com
Wed Feb 25 23:36:37 EST 2015

My first real play with Datagrids and I have to say I'm very impressed.
After sorting out the display and getting the first set of data into the DG
(which all went very smoothly - much better than expected) I went to
implement a Next and Previous buttons to move through chunks of data. To do
this I duplicated the Next and Previous btns on a different Card and then
using the Project Browser dragged the duplicates, one at a time, to the
Card with the DG. Unfortunately, for reasons I can't explain, the Previous
btn ended up on the Card, but the Next btn ended up as part of the DG.

I've now spent quite a lot of time trying to drag the Next btn out of the DG
and onto the Card but with no success. The 'owner' is a read only property
and there is no hint on how to scriptually achieve a change of ownership.

I'm looking at the Menu -> Object -> Ungroup Selected with fear and boding.
Foolishly I didn't start my DG experiment with 2 fields and an image as per
the online Lesson, but with 56 fields and some graphics in a rather complex
split level display. Looking at the Application/Project Browser I see there
are A LOT of objects associated with my DG that I didn't put there. So
admitting I have no clue as to the internal workings of the DG the last
thing I want to do is Ungroup Selected and have it all break.

Any help very much appreciated.

More information about the use-livecode mailing list