How do I write data into a DataGridView

I have created a database (dbsCustomer) in MS SQL Studio Express. There is a table (tblCustomers) which I want to display in VB, using a DataGridView. I am using Visual Studio 2005.

I have 3 classes in my VB.
(1)libDataAccessLayer (for reading data from the DBMS); I have added the database as a Data Source in this layer.

(2)libBusinessLayer (which gets the data from libDataAccessLayer)

(3)Display, holds a form to display the data in the DataGridView).

I just could not load anything in the DataGridView. Can anyone see if I have done anything wrong, or have I left something out?

I have attached a .doc file containing the codes that were used. There are coding for libAccessLayer, libBusinessLayer and Display; as well as the SQL statements for the database

Who is Participating?
jorgesv13Connect With a Mentor Commented:
You have to bind your datagridview to the BindingSource:

dgvCustomers.DataSource = bndCustomers
Set the Datasource property on the Datagridview on the Form page and modify what you would like in the GUI editor.  In the code behind fill the datasource for the page using Fill in the Load Function.

All Courses

From novice to tech pro — start learning today.