I have a number of databound forms exhibiting the same problem: I trap
the SelectedIndexChanged events of any ComboBoxes to notify me that the
underlying data has been modified by the user. The forms contain a tab
control with a number of pages, each of which may host one or more Combos.
The problem is that the SelectedIndexChanged event fires whenever a
particular tab page is selected by the user for the very first time,
even though the initial databinding statements will have been executed
many minutes before. Although I can ignore the events when I am in the
process of establishing the data, I can't see how to detect these
spurious occurrences, which seem to relate to the control being made
visible for the first time. Is there a property that would tell me this?
(The only obvious method is to compare the SelectedValue with the
underlying data, but I would prefer a simpler solution if possible)
PS. this is VS2005, C#, with strongly typed DataSets.
brian smith