Neven Draskovic

Neven Draskovic

  • NA
  • 117
  • 137.9k

DataGridView doesent refresh

Nov 18 2011 5:52 AM
Hi

I have a problem with refreshing the display in DataGridView. I bounded that control to a Data Source, and when I start the application, everything works just fine. I also made a section where I add new data to that dataset (by using ExecuteCommand method), and that works fine as well (I know this because when I close and start my application the new data appears normaly). The problem appears when I add new data to my database, the data doesent show in datagrid view. I found lots of instructions about this problem, but none of them seem to work. I tried the dataGridView.Refresh() method - I can see that the control is redrawn, but the displayed data stays the same, and I also tried the Invalidate() and Update method, both with same result. I even tried to set the DataSource propertie to null, and then refill it, but that only gives me an empty table with only one row.
Please advise
Tnx

Answers (15)