whats the best way to refresh a DataGridView when you update the base data source?
i'm updating the datasource frequently and wanted to display the outcome to the user as it happens.
i've got something like this made (and it works), but null'ing out the DataGridView.DataSource doesnt seem like the right way.
List<ItemState> itemStates = new List<ItemState>();
dataGridView1.DataSource = itemStates;
for (int i = 0; i < 10; i++) {
itemStates.Add(new ItemState { Id = i.ToString() });
dataGridView1.DataSource = null;
dataGridView1.DataSource = itemStates;
System.Threading.Thread.Sleep(500);
}