BUG: DataGrid Leave Event Fires Leave Event in Adjacent Controls (320768)
The information in this article applies to:
- Microsoft .NET Framework 1.0
- Microsoft Windows .NET Framework 1.1
This article was previously published under Q320768 SYMPTOMS When you move from cell to cell in the DataGrid control, the Leave event is triggered for a control that is either before or after
the DataGrid control in the tab order. If code is associated with the Leave event of the adjacent control, that code is executed.
CAUSE A bug in the DataGrid control causes the execution of the Leave event for the adjacent control. RESOLUTION To work around this problem, wrap the code in the Leave event of the adjacent control with a conditional statement that
tests to determine if the control actually has focus:
if (this.textBox1.ContainsFocus==true)
//event code here
STATUSMicrosoft has confirmed that this is a bug in the Microsoft
products that are listed at the beginning of this article.
Modification Type: | Minor | Last Reviewed: | 5/28/2003 |
---|
Keywords: | kbbug kbfix KB320768 kbAudDeveloper |
---|
|