Winforms appl creates customer edit form containing textboxes using
Customer dataSource = Northwind.Customers.GetByName("Airbus");
MaskedTextBox tb = new MaskedTextBox();
Binding binding = new Binding("Text", dataSource, "Phone");
binding.DataSourceUpdateMode = DataSourceUpdateMode.OnPropertyChanged;
binding.FormattingEnabled = true;
tb.DataBindings.Add(binding);
There is revert button in form which discards edited fields read original
values from database.
For this I use the following code:
// Re-Get original value
dataSource = Northwind.Customers.GetByName("Airbus");
However edit form still shows edited phone number.
How to force MaskedTextBox or other Control to update its contents if bound
entity (customer) is re-loaded form database ?
Andrus.