Suppose:
* I have a class Name with two properties: FirstName, LastName. Both
string.
* I have a form with one TabControl with 2 TabPages, with one TextBox
on each TabPage.
* I bind an instance of the Name class on the Form's Load event. For
each Binding object (one for each TextBox), I set the UpdateModes for
both DataSource and Control to "Never" as I want the user to explicity
click a "Save" button when he's ready to commit the information.
Result of running this Form:
* The TextBox of the visible TabPage gets bound very well, and displays
the property value. BUT, the TextBox of the second TabPage remains
blank.
Problem:
* The property value should have been set in all the TextBoxes, but
this does not happen for the ones which are not immediately rendered.
Possible Cause:
* The only difference is that one TextBox is going to get displayed /
rendered / drawn on Load, while the other gets displayed / rendered /
drawn later.
* DataSourceUpdateMode and ControlUpdateMode are set to "Never". If
they remain as their default values, things work fine, but that is not
my requirement.
* Because the DataSourceUpdateMode and the ControlUpdateMode have been
set to "Never", the value which should pass from the DataSource to the
Control, does not pass when the Control gets activated / created /
selected.
Can somebody provide with a solution ?
Requirements:
* The Form Controls have been split across multiple TabPages in the
TabControl.
* DataSourceUpdateMode and ControlUpdateMode are set to "Never" for all
the Bindings between the object and the controls.
regards,
RD