Data Binding and ComboBoxes

mac4_life

Member
Joined
Jun 21, 2005
Messages
13
Programming Experience
1-3
Hello,
New here, trying this forum out as my other one is primarily VFP based.

I have a form with multiple textboxes, a combobox, and a checkbox. These are all bound to a data table. The problem I am having is the fact that when the checkbox is checked true, I want to disable the combobox and set the index to 0.

This appears to work OK on the form, but it seems that when I try to save it, the index of the combobox pops back to whatever it was before I set it to 0. The data table doesn't seem to reflect the cboBox.SelectedIndex = 0 command I made. It works when I MANUALLY click on the combobox and select the top value, but not when I attempt to do it through code.

Any advice would be greatly appreciated. TIA!

MAC
 
Hey
I think as the combobox is bound to dataTable that is why it is happening. Before saving it you should unbound it and then try saving. Hope it works.
Good Luck.
Bye
 
I've tried that already to no avail.

Should I be trying to change the value in the data table? I guess I tried that too, and some of my controls went haywire.
 
Back
Top