loosing relations in grids 
Author Message
 loosing relations in grids

This is the scenario:
On a pagframe i have 3 grids.
One for customer
One for documents related to customer to customer number
One for contacts related to customer number
I have the relations set up in the grids builder.

In the documents grids text i have a call to another screen (by rightclick)
to show the documents text; do form .\forms\document.scx with doknumber

When i close the form document.scx i am loosing the abowe relations in the
pageframe.
How, my friends, shold I get this relations back. Somehow put them back in
the activate of the pageframe - but how???

Yours again..
Lasse



Wed, 19 Feb 2003 18:10:59 GMT  
 loosing relations in grids
You can try to set them in the DataEnvironment.
But you can also set them in the activate of the form.
This because i have some cyclic relations in my forms
For example:
In my customer form i want to see the group name where the customer is in
and not only the group number.
But in my groups form i want to see the customers in this group.

Greetings,

Ko Wisse
VFP'er
FlexiSoft



Thu, 20 Feb 2003 19:30:44 GMT  
 loosing relations in grids


Quote:
> You can try to set them in the DataEnvironment.
> But you can also set them in the activate of the form.
> This because i have some cyclic relations in my forms
> For example:
> In my customer form i want to see the group name where the customer is in
> and not only the group number.
> But in my groups form i want to see the customers in this group.

I have tried that - i put the relation in the grid - i put the relation in
the dtaeviroment - but it still loose the relatin when i return to the
screen.
Sothing here i have to remember that i do not ... :-)


Wed, 19 Feb 2003 21:28:04 GMT  
 loosing relations in grids
Hi Lasse
Have you tried parameterized views instead of relations - then you can
forget about indexes being right, workareas being right and keys missing.
And you can drive the grid from a textbox the user fills in, a combo or list
whatever RowSouceType they happen to use, or from another grid.
-Anders


Quote:
> This is the scenario:
> On a pagframe i have 3 grids.
> One for customer
> One for documents related to customer to customer number
> One for contacts related to customer number
> I have the relations set up in the grids builder.

> In the documents grids text i have a call to another screen (by
rightclick)
> to show the documents text; do form .\forms\document.scx with doknumber

> When i close the form document.scx i am loosing the abowe relations in the
> pageframe.
> How, my friends, shold I get this relations back. Somehow put them back in
> the activate of the pageframe - but how???

> Yours again..
> Lasse



Wed, 19 Feb 2003 21:59:12 GMT  
 loosing relations in grids
Could you give me an exaple of what - and how you mean Anders....


Quote:
> Hi Lasse
> Have you tried parameterized views instead of relations - then you can
> forget about indexes being right, workareas being right and keys missing.
> And you can drive the grid from a textbox the user fills in, a combo or
list
> whatever RowSouceType they happen to use, or from another grid.
> -Anders



Thu, 20 Feb 2003 00:24:21 GMT  
 loosing relations in grids

Quote:
> I have tried that - i put the relation in the grid - i put the relation in
> the dtaeviroment - but it still loose the relatin when i return to the
> screen.
> Sothing here i have to remember that i do not ... :-)

Normally they should stay, but probably you manually close relations
somewhere.
You can also check if in the other form AutoCloseTables is set.
If so, check what is happening if you set it off.
Probably the table you want to use int Form1 is closed in Form2
These problems and the cyclic relations story made me doing all this myself.
I open all my base tables on startup, and set the relations in the activate
of the form (after closing all the relations first.)
This works great.
The thing with using views, like Anders said, is also a good idea.
I use that for example when there are a lot of relations.

Greetings,

Ko Wisse
VFP'er
FlexiSoft



Fri, 21 Feb 2003 00:20:23 GMT  
 loosing relations in grids

Strange....
I made that other screen as a top level form with its own dataenviroment..
and the relations stayed.
The other cenario
What i was doing was to call anoother screen from a top level form with
relations. The other screen had datasession 1. Default datasession.
When i made it to datasession 2 - as a private datasession everything was
ok. and the relations from the calling screen stayed in focus.

Lasse



Thu, 20 Feb 2003 00:59:46 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Relations, Relation,s Relations 2.6

2. GRID REFRESH : pb with relation and skip or go function in one to many grid form

3. loosing grid whn I re-run a query

4. Grid with Parent-Child relations

5. Refreshing grid in relation

6. adding records in a grid with relation

7. Grid Problem and Set Relation

8. : Relation & Grid

9. Grid and multiple relations...

10. Relations and GRID

11. adding records in a grid with relation

12. Q/VFP: 1:1-relation + filling a grid ?????

 

 
Powered by phpBB® Forum Software