If I click in the cell (or minimize and then maximize form), the displayed value is refreshed. The list I am using is an interface type which doesn't implement IBinding List.But, the concrete type being used to initialize the list does inherit off of Binding List.
"Forces the control to invalidate its client area and immediately redraw itself and any child controls." Control.
Refresh Method Observablecollection : Represents a dynamic data collection that provides notifications when items get added, removed, or when the whole list is refreshed.
When I add a row to my Data Table, my Data Grid View does not update, until I switch to the other control, and move back to the one with DGV.
I have read some solutions on stack, which basically tell me that i should use Binding Source, but this code: does not work as well.
The problem I am having is that I have some functions that will build a new Data Table object which is separate from the original which needs to replace the original Data Table that is bound to the Data Grid View.
source Table = new Data Table("New Table"); // If the structure of `Original Table` and `New Table` are the same, then do this: source.
That way if the user resizes a column it won't toss out their change on refresh. My recommendation: If you have ownership of the datasource, don't use a List. The Binding List has events that fire when items are added or changed, and the Data Grid View will automatically update itself when these events are fired.
just talks about the control redrawing, nothing to do with bindings unless I am very much mistaken!
What is the best way to refresh a Data Grid View 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.
Binding the source didn't work for me and Datagridview doesn't have "Main View" variable.