J
John Hui
Hi,
I have a .NET textbox bound to a DataColumn (String data
type). What I want is that when the the user leaves the
focus from the textbox, the changes are automatically
updated to the the DataTable (ie containing the
Datacolumn to which the textbix is bound).
The method I use is to call the 'EndCurrentEdit' method
for the corresponding CurrencyManager.
This method works fine except under the following
condition:
The textbox undergoes a modification such that the length
of the Text property in the TextBox does not change (ie
is the same as that of the String in the DataColumn).
This happens for example when a user makes a type and
changes one letter (or two) instead of adding new words
or deleting words. In this case, the datarowview
(referenced by the 'Current' property in the
corresponding CurrencyManager) is not in edit mode
(ie 'IsEdit' is false). Calling 'EndCurrentEdit' will
not update the DataColumn at all.
Can anyone confirm this is a .NET bug? Is there a
workaround for this? Does this happen in any other .Net
controls?
Thanks in advance. A sample code is available.
John
I have a .NET textbox bound to a DataColumn (String data
type). What I want is that when the the user leaves the
focus from the textbox, the changes are automatically
updated to the the DataTable (ie containing the
Datacolumn to which the textbix is bound).
The method I use is to call the 'EndCurrentEdit' method
for the corresponding CurrencyManager.
This method works fine except under the following
condition:
The textbox undergoes a modification such that the length
of the Text property in the TextBox does not change (ie
is the same as that of the String in the DataColumn).
This happens for example when a user makes a type and
changes one letter (or two) instead of adding new words
or deleting words. In this case, the datarowview
(referenced by the 'Current' property in the
corresponding CurrencyManager) is not in edit mode
(ie 'IsEdit' is false). Calling 'EndCurrentEdit' will
not update the DataColumn at all.
Can anyone confirm this is a .NET bug? Is there a
workaround for this? Does this happen in any other .Net
controls?
Thanks in advance. A sample code is available.
John