Page 1 of 1

How to import a stack with dataGrid into another mainStack?

Posted: Tue Jul 14, 2009 3:00 pm
by giovannic
Hi all!
I've a little question for u hoping u can help me.
I'm working on a stack using a simple dataGrid with a modified script and row template.
In future I've to use this stack as substack of another stack in which there are other configured and fully functional dataGrids.
Now my question is: how can I import the stack with dataGrid in other substacks? What have I to do to have my dataGrid functional when the template is in a stack "datagrid template XXXX" and I've to import it in another mainstack?

I hope u can answer this simple question. The risk for me is that I do a lot of work to personalize my dg template and script and, when I'll import my stack as substack, I've to begin this personalization from scratch! Brrrr!!! Bye-

Posted: Tue Jul 14, 2009 3:12 pm
by Klaus
Hi giovanni,

try this:
1. Make a copy of your stack with the datagrid! :-)
2. Open your stack with the datagrid
3. Open its substack "Datagrid template..."
4. Open your mainstack "XXX"
5. In the stack "Inspector" of stack "Datagrid template..." select "XXX" as the new mainstack
6. Do the same for your stack with the datagrid
7. Save your mainstack "XXX"

That was it :)

You have to do it this way, since you cannot make a stack with substack(s) a substack of another (main-)stack.

Best

Klaus

Posted: Tue Jul 14, 2009 3:51 pm
by giovannic
Hi Klaus. First of all TY for your reply.
It's really clear but my problem it's another.
I'm unable to do what u say because my future mainstack (that u call "XXX") contains by itself a dataGrid template used in other datagrid it use, so I can't import another "data grid template..." as substack as it have already one...

I hope to be clear explaining my problems.
Sorry, but my english is really bad.

Bye-

Posted: Tue Jul 14, 2009 5:33 pm
by Klaus
Buonasera Giovanni,

are you sure that the stack names are really identical?
Please doublecheck! :-)

Hi!

Posted: Tue Jul 14, 2009 6:21 pm
by giovannic
Hi Klaus!
Yes, I'm sure!!!
We are developing different parts of the same application, starting from a common base stack...
Can I force my dg to use another "datagrid template" stack so I can import the new one in the main app stack?

Posted: Tue Jul 14, 2009 6:39 pm
by Klaus
Ciao Givanni,

OK, just wnated to be sure :-)

Her is what you could try:
1. open the stack with the datagrid that you wnat to make a substack of.
2. open the substack "Datagrid template XXX"
3. Rename that stack, maybe just change the last number
4. open the "Inspector" for you datagrid
5. choose "Custom Properties" in the popup
6. Select "dgProps" in the popup "Set" (middle of Inspector
7. find the cp "row template"
8. change its content according to 3.

Now you can use the technique describe in my earlier post to make these two substacks of your mainstack.

I personally keep the "template" stacks as external mainstacks in my projects using the technique described above.
Took a while until I discovered how this works, Datagrids are a quite complex beast :)


Best

Klaus

Perfect!

Posted: Wed Jul 15, 2009 6:57 am
by giovannic
Hi Klaus.
As I read it in DG documentation I've never tried to rename the stack "datagrid template xxx", so I've never tried to do this!
Then I'll try the following:
1) extract the dg template, reimporting it as as new substack with a new name;
2) change the dg template custom property of all my new datagrid to have them use the new template
3) in the future export my new stack and my template.

Thank u for all ur support and time!

Bye

It's OK!

Posted: Wed Jul 15, 2009 7:27 am
by giovannic
Hey! I've tried the procedure descripted above and it runs perfectly!
Now my new stacks are indipendent from the original datagrid template and I simply can export all of them importing in the other mainstack.

TY for all and bye-

POSTEDIT:
It's ok for row template but "Row Behavior" refeer always to the old stack template... I've searched through the custom properties but there's nothing about this... or I'm unable to find it!!!
Thank u- Bye

POSTEDIT 2: Nevermind! I've found it! It's in the behavior of group of template!!! Now it's really all OK!!!

Posted: Wed Jul 15, 2009 8:38 am
by Klaus
Gratulatione :)

Posted: Wed Jul 15, 2009 10:42 am
by giovannic
Klaus wrote:Gratulatione :)
Eh eh! I think u would say "Congratulazioni"!
Tnx

But I went over this!!!
To have full portability of my stacks now I incorporate the dg template in a card of the stack in which i'm working on, resetting the right parameters (id of template and id ot the behavior button) every time I use the stack (only 2 instructions)!
It runs perfectly and allow me to port my stack everywhere I want!
Hope this can be useful for other ppl in situations like mine!

Bye-

Posted: Wed Jul 15, 2009 10:50 am
by Klaus
Si, Congratulazioni, certo!

My italian is really lousy, but my latin is better ;)

LOL

Posted: Wed Jul 15, 2009 12:31 pm
by giovannic
:D don't worry about ur italian!
Probably it's better than my english!!! LOL

Posted: Wed Jul 15, 2009 12:38 pm
by Klaus
E possibile, ma improbabile!

But my favourite italian phrase is definitively:
Questi cazzi di piccione! :D

:D

Posted: Wed Jul 15, 2009 2:11 pm
by giovannic
LOOOOOOL!!!!

With ur favorite phrase u could live in
many of the biggest italian cities!!!

LOOOOOOL!!!!

Posted: Wed Jul 15, 2009 2:13 pm
by Klaus
8)
:D