Page 1 of 1

Shared Datagrid

Posted: Thu Aug 11, 2016 10:13 pm
by Stewart Lynch
Is it possible to have he same datagrid and content shared among many cards as a shared background control? If so, any suggestions would be appreciated

Re: Shared Datagrid

Posted: Fri Aug 12, 2016 12:28 am
by dunbarx
Hmmm.

Possibly tricky. DG's are already so grouped it is hard to even understand them. But one can set the backGroundBehavior of a DG to "true" by hand, and this will permit it to be shared among cards. The tricky part is to also set the sharedText of all those fields.

So try this. Make a new stack. Put a DG on the card, and set its backGroundBehavior to "true". Put something into the contents of the DG. In the stack script:

Code: Select all

on opencard
   set the dgText of group "datagrid 1" of this cd to the dgText of group "datagrid 1" of cd 1
end opencard
Now make a few new cards. You will have to tweak this, setting the column names in a similar manner, and you may discover a few more items that have to be addressed.

Craig Newman