Page 1 of 1

Datagrid copying and pasting

Posted: Mon May 05, 2014 11:25 pm
by jalz
Hey all,

Quick question. I've got my datagrid looking and working as close to how I want it. This datagrid is in stack A. I wanted to place a duplicate version of that datagrid on stack B, however editing the template was a little fiddly and instead of me dragging a new dg and recreating the row template on a new dg, I just copied and pasted the working data grid from stack A to stack B. The first thing I noticed was that both data grids share some of the properties, like if I make an alteration to a row template in stack A, stack B would inherit it. I also think if I changed the row behaviour in stack B, stack A would inherit that change. As the data grid is displaying exactly the same data, I don't really mind that both these data grids seem to be 'sharing' the underlying properties of a dg.

However, in the back of my mind, I have a suspicion that copying and pasting a datagrid between stacks should be avoided and I should take the time out to manually create each object individually. As this is still very early in my project, does anyone have any genuine reason I shouldn't be copying and pasting objects from one stack/card to another once I have perfected the object?

Thanks
Jalz

Re: Datagrid copying and pasting

Posted: Mon May 05, 2014 11:37 pm
by Simon
Hi Jalz,
See that Data Grid Templates stack?
There should always be one more card in it than you have dataGrids if you want unique dataGrids. Each card contains the Row Template and Behavior Script for each dg, If you just copy and past a dg they share them.

You can see what happens with a new stack, just drag a dg on and watch the DG substack.

Simon