I believe basically you want to perform actions on combobox if user changes
them, not because of bindingcontext change.
There are 2 possible solutions I can think,
1. Use Removehandler and addhandler for all combobox. use removehandler in
listbox before you start poplulate details' combobox and addhandler as soon
as you finished binding combobox with details' records.
2. use boolean variable blnByBinidingcontext. before you populate values
for comboboxes make this variable true. after binding every combobox make it
again false. This variable should be private at class level. Check this
boolean variable in combobox's selectedindexchanged event. if
blnByBinidingcontext = true then exit procedure.
Regards,
> Hello,
>
[quoted text clipped - 11 lines]
>
> Eric
I did something quite similar to fix the problem. It turned out that the
only time there was an overlap with the BindingContext and ComboBoxes'
SelectedIndexChanged events was on form load when the ComboBox was bound to
its data source.
To fix this, I just declared a Boolean var, IsFormLoad. (Then I of course
set it to True at the beginning and False at the end of the form's load
event.) Within each combo box's SelectedIndexChanged event, I added code
like the following:
If Not IsFormLoad Then
' Code to save back user's changes
' to the ListBox's DataView...
End If
Thank you for your reply, Rajesh!
Eric
> I believe basically you want to perform actions on combobox if user changes
> them, not because of bindingcontext change.
[quoted text clipped - 28 lines]
> >
> > Eric