After adding a row into the DB i am using the following to show me the DGV containing recently added data but it is not showing up.
What should i do?Code:MWClientDataSet.Clear()
ClientProfileTableAdapter.Fill(MWClientDataSet.ClientProfile)
Printable View
After adding a row into the DB i am using the following to show me the DGV containing recently added data but it is not showing up.
What should i do?Code:MWClientDataSet.Clear()
ClientProfileTableAdapter.Fill(MWClientDataSet.ClientProfile)
Need more info to go on.... Are you sure the new record has successfully being inserted into the database? Have you checked to make sure your fill has returned any/all records, what is the table record count before & afterwards. Also you are not showing the coding that binds your datatable to the dgv, are you sure this is set correctly and on the right dataset?
Yes the record has successfully been inserted into the DB. The DGV is perfectly bound to the DataTable as i am using the second statement to populate it on Load. But once i have inserted the record into the DB, passing this command doesn't show up the new data. Even if new row is not of concern, the edited data is also not getting refreshed in DGV.
Is there any other way to do this?
Again, your coding is not showing how the data is being bound to the dgv or even if its the same dataset or not...
:| :|
As long as the data is being saved, you do not need to reload the datagridview if the data is already in the datagridview.
The .CLEAR event "Clears the DataSet of any data by removing all rows in all tables.", so when you come to reload the the datagridview there is nothing there.
Computerman :)
If the data is saved as he said it was, the tables should be recreated and refilled showing the new data when he calls the fill. So this is not the problem
anyone please???
hello ??
Can you show me your code for updating the dataset.
Computerman :)
I am not using dataset to update my DB. I am using DataGridView only to show the records from DB. I am adding, editing the DB through other forms. What i am looking for is to refresh the DataGridView to show current data. Thats it!.