Fill(table); Binding Source b Source = new Binding Source(); b Source. Select Command = new My Sql Command(sql Select All, con); Data Table table = new Data Table(); My DA. Configuration; namespace GRP_02_03_SACP I have no errors already by following your code.
Create a Binding Source object, and once you have populated your Data Table/Dataset, set the datasource for your Binding Source to your Data Table.
The Display Data() method fills in the data in the Data Grid View.
I'm trying to create a refresh button to automatically refresh the data inside my datagridview after i have finish updating them. The data displayed remains the same as the original one.
If you reload data into your Data Table it will reflect in the Data Grid Automatically.
After entering data into all the textbox, and after clicking the submit button, it won't immediately show in the datagridview, I need to reopen the form in order to see the new inserted row. If you've got a typed Data Set then you use Table Adapters to retrieve and save data. Use a Table Adapter to retrieve the data and populate a Data Table. You bind your Data Table to a Binding Source and the Binding Source to your controls. Read the last paragraph of my previous post and then ask yourself if that's what your code is doing.