I am trying to bind data to a datagridview in C#. How can I bind table data to a gridview please.
Below is my code used.
Getting all data.
pu
You can do it using a Binding source:
var source = new BindingSource(); source.DataSource = new AddressAccess().getAllAddress().ToList(); dgvAddresses.AutoGenerateColumns=true; dgvAddresses.DataSource = source;