G
Guest
I have a TextBox, textBox1, bound to a column in a DataTable. Any data the
user enters in the textBox1 is correctly used to update the DataTable. So if
the user enters "xyz", the corresponding field in the DataTable also contains
"xyz". However, when the user moves to another field, I want the data in the
textBox1 to be formatted, e.g. converted to upper case, and the formatted
data used to update the DataTable. I format the field in the
textBox1_LostFocus method and observe the field is formatted correctly on the
screen, so "xyz" changes to "XYZ". But after the user enters data in any
other field, textBox1 changes back to the original, unformatted value, "xyz".
It looks like my change in the LostFocus method did not cause the DataTable
to be updated with the new value. How do I make this happen?
Thanks,
John Ch.
user enters in the textBox1 is correctly used to update the DataTable. So if
the user enters "xyz", the corresponding field in the DataTable also contains
"xyz". However, when the user moves to another field, I want the data in the
textBox1 to be formatted, e.g. converted to upper case, and the formatted
data used to update the DataTable. I format the field in the
textBox1_LostFocus method and observe the field is formatted correctly on the
screen, so "xyz" changes to "XYZ". But after the user enters data in any
other field, textBox1 changes back to the original, unformatted value, "xyz".
It looks like my change in the LostFocus method did not cause the DataTable
to be updated with the new value. How do I make this happen?
Thanks,
John Ch.