Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB.Net VS 2010 And DataSet Visualizer Scope Over More Than One Form

Status
Not open for further replies.

Skittle

ISP
Sep 10, 2002
1,528
0
0
US
This might be a bit oblique but it's bugging me.

I have an ‘invoice header’ form1 that lists all invoices via a DataGridView.
Each invoice header row has an unbound button that opens another detail form2 showing all the detail lines for the invoice from another table.

Both forms live in the same solution and reference a single dataset ( .xsd ) in the solution.
The header form1 populates the Header table in the dataset.
The detail form2 populates the Detail table in the dataset.

When I am in debug I can see the Header rows and columns in the dataset via the standard Dataset visualizer when I put my mouse over it in form1 code.

When I step into the Detail form2, the Header rows and columns can no longer been viewed in the form1 code.

When form2 Detail ends and returns focus to the form1 Header, the Header rows and columns can be viewed again from form 1 even though they have not been reloaded.

This means that I have two instances of the dataset ( I think ) - one for each form.

In debug how can I view the header form1 dataset instance of header data when I am in the detail form2? Preferably via the dataset visualizer?

Thanks

Dazed and confused.

Remember.. 'Depression is just anger without enthusiasum'.
 
If I have a main form with a lot of pop up children forms, I instantiate a dataset in the mainform and pass a reference to that DS in the child constructor or just make it a property of the main form and the child forms can reference that property. I actually am not that familiar with using the visualizer (which I need to learn), but that should allow you to debug in the child form.
 
I think I see what you mean.
So you create a new instance of the dataset in the 'parent' form, set it to equal the parent form dataset and pass it to a Public Shared variable in the New sub-procedure of the instance of the child form?.



Dazed and confused.

Remember.. 'Depression is just anger without enthusiasum'.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top