1

I saw this question asked a million times and none of the answers looked right. I hope someone can help me.

I have a DataGridView with a TableAdapter, BindingSource and DataSet objects all created from the designer.

All I want to do is simply reload the data from the database since I change it by another way, and I cannot find any solution to this.

sekmet64
  • 1,635
  • 4
  • 19
  • 30
  • Could you post a link to at least few of those millions? – H H Apr 09 '11 at 16:22
  • Yes! Here's one where there are a bunch of workaround like solutions http://stackoverflow.com/questions/253843/simple-datagridview-refresh-question, no answer here: http://stackoverflow.com/questions/1481636/datagridview-update, no answer here: http://stackoverflow.com/questions/5326987/update-access-database-with-datagridview so on, i dunno i searched in google for 15 mins and found this refill method – sekmet64 Apr 14 '11 at 08:49

2 Answers2

0

Did you tried BindingSource.ResetBindings Method

Anuraj
  • 18,859
  • 7
  • 53
  • 79
  • yes, it doesn't do it. It doesn't read the data from the database, only refreshes the control with the client side data I guess.. – sekmet64 Apr 09 '11 at 15:50
  • I didn't tried it, but I found this : http://msdn.microsoft.com/en-us/library/f61k6akt.aspx – Anuraj Apr 09 '11 at 15:53
0

Finally I found a way myself, hope it helps others, and If you know a better way feel free to correct me:

dataAdapter.Fill(dataSource.TableName)
sekmet64
  • 1,635
  • 4
  • 19
  • 30