almost newbie questions about passing from one class to another

Q

queanbeyan

Hi

I have been working on an application that does metadata searches.

The application has a main from the has some buttons that a user can
click on that open different versions of a search form that allows them
to search across some criteria.

I am now trying to remove the need for all the different search forms
and I would like to populate one DataGridView on the main form with
what i was previously producing on the various other forms (resetting
each time a button is clicked). However each of the other forms has a
button click method that runs and produces data for a DataGridView that
is part of that form.

I am hoping to get some advice about how to structure the code. Should
I migrate the classes from the other forms to the main form - or should
I try to pass the info that would normally go into the each form's
datagridview to the main datagridview. I would like to develop one
class that can handle all the OleDb requests - but I havent been
successful at that yet.

I have not been successful in passing data from one form to another -
so I would like to find out how to do this - even if this is not the
best way forward.

I hope you can make sense of this posting - I am getting confused as I
type!!!

Doug
 
K

Kevin Spencer

Your question is somewhat confusing. It would help if you talked a bit more
about the requirements. But from what I can gather, I think perhaps a
TabControl on a single Form would fit your problem. You can put a
DataGridView on each tab.

--
HTH,

Kevin Spencer
Microsoft MVP
Chicken Salad Surgery

Accept the Unexpected.
 
G

gordon

Thanks Kevin

Yes you are probably right - a tab control may work just fine.

thanks

doug
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top