0

I have a DataGridView bound to a DataTable as a DataSource. Whenever I add/delete rows (few hundred rows in couple of seconds) in the DataTable the changes are not reflected on the DataGridView at once.

But if I resize the form, or scroll up and down the rows, or minimize and then maximize the form the changes are present. Does this have to do with buffering or refresh event not being fired at once?

DataTable dt = new DataTable();
DataGridView1.DataSource = dt;
astralmaster
  • 2,344
  • 11
  • 50
  • 84
  • Maybe duplicate http://stackoverflow.com/questions/7008361/how-can-i-refresh-c-sharp-datagridview-after-update – Alexandru Lache Apr 11 '15 at 20:28
  • It's not. That question refers to data binding itself. I am having trouble refreshing the graphical part of DataGridView – astralmaster Apr 12 '15 at 07:37
  • .Refresh() method of DataGridView is one option to do that, but it forces the whole graphics reload of the component which is slow when dealing with few thousands of rows. – astralmaster Apr 12 '15 at 07:38

0 Answers0