KB Article A884
Visible to All Users

Big red X: A control becomes crossed with red lines after an exception

Description:
Sometimes an error occurs and the grid displays a big red X. What is the cause of this problem and how can I fix it?

Answer:
This happens when an unhandled exception occurs during painting. You can determine which code has thrown the original exception by setting "Break into the debugger" to "When the exception is thrown" for CLR Exceptions in the Exceptions dialog (Debug | Exceptions…).
The problem described may appear if you handle a control's CustomDraw event and an exception occurs in your code.
Another possible cause is methods called asynchronously, which update a control. If you have such methods called by a timer or a separate thread or a remote object's event, you should call them from the main application thread via the BeginInvoke method. Please review the following articles:
Is the XtraGrid thread safe?
How to improve the grid's data loading performance
How to work with the XtraTreeList control in a multi-threaded application
Optimization best practices
Please note that when using the Windows Forms data binding, the underlying data (the control's data source) must not be changed from another thread. Any synchronization via the BeginInvoke method does not help in this situation. Please review the following article to learn the details:
Can I avoid the ArgumentOutOfRangeException when updating the Grid's data
If you have difficulty in determining the cause of the problem, please try to recreate the issue in a sample project and send it to our Support Team.

Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.