In desperate need of help (old, se other thread with same name)
In desperate need of help (old, se other thread with same name)
I'll try to make this short....
I have a databound form (bound to Table1) with a combobox that has another table (Table2) as its datasource, the SelecteValue property of that combobox is databound to Table1.
So basicly I choose something from the combobox that has values from Table2 and save the cjosen value to Table1.
If I do this manually (with the mouse) everything works great, but if i do it with code (ie Combobox1.SelectedValue = 2 for example) it does not work, it then takes the default value (0) when I call the EndCurrentEdit of the BindingManagerBase.
It also works if I set the SelectedIndex property of the combobox, but that is of course something I'd rather not do as I have to loop through all indexes of the box to find wich one has the correct Value.
Note:
I've heard sayings like "databinding of Hell" and Iv'e heard people saying that databinding is the devils work. Just to let you know...... THE DEVIL IS A MERE FART compared to databinding !!
I guess you can get a notion of my frustration...... :)
Any help is GREATLY appreciated!!