3 datagrids linked trought data environment

I have 3 datagrids linked together via data environment:

dgCustomer is parent to dgContact, dgContact is parent to dgInvoice.

It is working well when the form loads... the dg3 reprensents the dgInvoice shows the records for the selected Contact and the dgContact shows the good contact for the selected customer.

The problem: as soon as I select another customer, the good contact are shown in the dgContact but the dgInvoice is empty... and stays this way even when I go back to the first customer... this dataGrid is empty except on the formLoad.

Anyone as an idea?
jeanfrancoismelanconAsked:
Who is Participating?
 
Éric MoreauConnect With a Mentor Senior .Net ConsultantCommented:
You better go using code. See the DataForm Wizard.
0
 
Éric MoreauSenior .Net ConsultantCommented:
Show you code that refresh the grids.
0
 
jeanfrancoismelanconAuthor Commented:
No code is necessary to refresh the grids with the dataEnvironment
0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

 
Éric MoreauSenior .Net ConsultantCommented:
Have you created hierarcical commands? What I suggest is that you use the DataForm wizard to generate a Master/Detail form and look at the code when changing record. You will see that some code is required to refresh the grids.
0
 
jeanfrancoismelanconAuthor Commented:
But then way is it working very well with 2 dataGrids?
0
 
Éric MoreauSenior .Net ConsultantCommented:
Is your hierarchie well formed?
0
 
jeanfrancoismelanconAuthor Commented:
Yes, it is well formed. When I change an Invoice, then I requery the recordset and re-bind the dataGrids, it is working again, but the same thing appens as on formLoad.

Any Idea?
0
 
Éric MoreauSenior .Net ConsultantCommented:
So you have some code! Show it.
0
 
jeanfrancoismelanconAuthor Commented:
Yes but the code I have is only when I update some data... but the problem I have is when I click on my dgCustomer... the dgContact refreshes correctly, but with the dgInvoice nothing appens. And I do nothing much (or less) between those two.
0
 
jeanfrancoismelanconAuthor Commented:
I know I can make it work using something else than the data Environment... but I want to use the date Environment because there is no code to make it work... all I want to know is if it works properly.
0
 
Éric MoreauSenior .Net ConsultantCommented:
This question appears to be abandoned. A question regarding it will be left in the CleanUp
area; if you have any comment about the question, please leave it here.

Unless there is objection or further activity, one of the moderators will be asked to accept the comment
of <emoreau>.

DO NOT ACCEPT THIS COMMENT AS AN ANSWER.
0
 
NetminderCommented:
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.