When you link your database to the "DataSource" in the DataGridView properties, the IDE automatically adds the BindingSource and TableAdapter to your form.
If the database is updated and you want to update the DataGridView, call this:
this.<table name>TableAdapter.Fill(this.<DB name>DataSet.<table name>);
Where <table name>
is the name of your table (for example, users), and <DB name>
is the name of your database (for example, MyDB).
this.UsersTableAdapter.Fill(this.MyDBDataSet.Users);
source share