N
njp
BlankHi,
I select a value in a bound combobox on tab 1, then I programically assign
related text to a bound textbox's text property on tab 2. I see the text in
the textbox when I view tab 2 and the textchanged event fired. However,
after I save the changes, close the form, reopen the form, the previous data
appears in the textbox, not the new data. Here's the code from the
combobox's selectedIndexChanged event:
With txtSignalOffset
.Focus()
.Text = "10"
End With
CType(sender, ComboBox).Focus()
CType(cmTerminal.Current, DataRowView).EndEdit()
Both the combobox and textbox are bound to the same datatable. If I type
data directly into the textbox there is no problem. However I want the
textbox to be read only and assigned a value by code only.
I tried editing the CType(cmTerminal.Current, DataRowView) datarow directly
but then got screwy behavior from the combobox such that it wouldn't change
its selected value - it kept bouncing back to the original value. Same thing
happened when I instead tried directly editing the datatable. This is
driving me crazy and wasting a lot of time.
Thanks for any insights you may have,
NJ
I select a value in a bound combobox on tab 1, then I programically assign
related text to a bound textbox's text property on tab 2. I see the text in
the textbox when I view tab 2 and the textchanged event fired. However,
after I save the changes, close the form, reopen the form, the previous data
appears in the textbox, not the new data. Here's the code from the
combobox's selectedIndexChanged event:
With txtSignalOffset
.Focus()
.Text = "10"
End With
CType(sender, ComboBox).Focus()
CType(cmTerminal.Current, DataRowView).EndEdit()
Both the combobox and textbox are bound to the same datatable. If I type
data directly into the textbox there is no problem. However I want the
textbox to be read only and assigned a value by code only.
I tried editing the CType(cmTerminal.Current, DataRowView) datarow directly
but then got screwy behavior from the combobox such that it wouldn't change
its selected value - it kept bouncing back to the original value. Same thing
happened when I instead tried directly editing the datatable. This is
driving me crazy and wasting a lot of time.
Thanks for any insights you may have,
NJ