FIX: Cannot close form when the Tag property is bound to a read-only field (317254)
The information in this article applies to:
- Microsoft ADO.NET (included with the .NET Framework)
- Microsoft Visual Studio .NET (2002), Professional Edition
- Microsoft Visual Studio .NET (2002), Enterprise Architect Edition
- Microsoft Visual Studio .NET (2002), Enterprise Developer Edition
- Microsoft Visual Studio .NET (2002), Academic Edition
This article was previously published under Q317254 SYMPTOMS If the Tag property of a Windows Forms control is bound to a read-only field
in a DataSet object, you cannot move the focus away from the control, and you
cannot close the form. CAUSE Because the Tag property does not cause a change notification, an attempt is
always made to update the underlying DataTable class. This does not occur with the Text property because the TextChanged event is fired, and a check is made to see if the property was
updated. RESOLUTION To work around this problem, handle the Parse event for the data-bound property, and then throw an exception.
This exception is caught at a lower level and is not seen. The exception does
not interfere with other data binding on the form. STATUSMicrosoft has confirmed that this is a bug in the Microsoft
products that are listed at the beginning of this article.
This bug
was corrected in Microsoft ADO.NET (included with the .NET Framework 1.1), and
Microsoft Visual Studio .NET (2003).
Modification Type: | Minor | Last Reviewed: | 9/15/2005 |
---|
Keywords: | kbvs2002sp1sweep kbfix kbbug kbDataBinding kbnofix KB317254 |
---|
|