HighTechTalks DotNet Forums  

Changing combobox's datasource, then enter it(focus) and leave

Dotnet Framework (WinForms DataBinding) microsoft.public.dotnet.framework.windowsforms.databinding


Discuss Changing combobox's datasource, then enter it(focus) and leave in the Dotnet Framework (WinForms DataBinding) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
buddha_bg
 
Posts: n/a

Default Changing combobox's datasource, then enter it(focus) and leave - 09-12-2008 , 03:08 AM






Hi everyone!
I observe a freaking strange behaviour of a combobox databinding. I
isolated it to this situation:
We have a standart scenario, a user control/form with a combobox,
SelecedValue bound to some column of a datatable in a dataset through
bindingSource, and its Datasource set as another bindingSource,
connected to another, lookup table.

If we enter/leave combobox without changing dropdown selection,
nothing happens, ok, underlying data doesn't change.

Now the thing is, if we change combobox's datasource in any way (apply
filter,change bindingsource's datasource, change combobox's datsource
- all with same metadata),
and then we enter and then leave combobox, the underlying databound
data changes (the SelectedValue column in databound table).
In the callstack it seems that on combobox's validating, the
databinding decides to pull new data from lookup datasource.
And dont see why, it doesnt seem normal, am i going nuts or what?

Thank in advance if someone can bring in some light

Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.