Situation
I am designing a Windows Forms-application using the Model-View-Presenter structure. This means that every Form has a presenter-class behind it, processing user input. Beside this, I am using a repository structure, meaning that I wish to put all my SQL queries in separate class(es).
For one of my forms, I wish to use a DataGridView to show some data from a database.
What I want
Once a user presses a certain button, I wish to load data from the database in the DataGridView. In other words, I wish to bind my DataGridView1.DataSource to a BindingSource which gets data from the database through an SQL-query.
However, since my DataGridView is private, I cannot access its datasource from my presenter- or repository-class.
My question
To sum up, my question is whether it is possible to pass a BindingSource from the repository-cass (where the SQL-connection and queries are done), to my presenter, to my WinForm, which will use it to fill the DataGridView.
If this is not possible, is there an alternative way to keep my MVP- and repositorystructure, keep my DataGridView private and still fill it with database-data?
If the question is not clear, please ask for details. Thanks in advance!