Is there any method to populate a dataGridView on a form from another class? The functions I use to connect and run queries to the DB are in a class, but I want the results to be showed in the main form. How can I do this?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Set the methods that you want to access as public.
If the class is in another project, you may have to add a reference to it in your current project.
Once the method is public, do something like this: