VB.NET 2005 DataGridView Redraw
Description:
I am using a global DataGridView that was created once, then I split this ByRef grid across multiple user controls, strange thing -> the first control adds or initializes this grid, will draw all other controls will not draw it (of course, and I I know why he doesn't draw it)
Question: how can I get the global datagridview to redraw every custom control I have .. !!?
Let's mention that I am DataGridView
populating Manully without using a data member / data source.
Okay, this is really very dangerous. Controls are not designed to be partitioned by multiple forms / controls. You would be better off partitioning the data (via an observable collection, for example, BindableList<T>
or DataView
if you are so inclined). Obviously this means setting the datasource / datasource or doing all updates (for all grids).
But seriously; DataGridView
(or any other control AFAIK) shouldn't be used this way.
For information, assuming VB is ByRef
comparable to C # ref
then you don't need that ... you are already passing the reference (by value) only. But that doesn't matter, as it won't work.
source to share