dotnet windows forms databinding:
(Framework 2.0, VS2005, XP sp2 all fully patched)
I have a Form with a DataGridView and a BindingSource, among other controls.
The DataSource of the DataGridView is the BindingSource. The DataSource of
the BindingSource is a List(Of myclass). So far, so good.
In response to user action on the other controls, the List(Of myclass) may
be re-populated. When this happens, I execute "BindingSource1.ResetBindings".
I do this as well when the List(Of myclass) is resorted based on a
ColumnClick on the DataGridView.
Again, so far, so good.
The Problem is that Resetbindings causes multiple SelectionChanged events
and multiple CurrentChanged events to be raised, though not necessarily an
equal number of each. I only wish to handle USER caused SelectionChanges (or
CurrentChanged) events.
In other words, I wish to supress or ignore such events that occur as a
side-effect of reloading/sorting the List(Of myclass). At the very worst, I
would like to set some property or change my code such that I only get ONE of
each event per reload of the List(Of myclass). I know how to deal with it if
only one such event is raised. Irregular multiple occurances are much more
difficult to deal with.
In the DataGridView FAQ, there are words to the effect that Event Raising
can be suppressed. I have no idea where to even look for how to do this.
Any help will be appreciated.
--