Hi,
I have a grid that i am binding to csla biz objects, and this all works fine. But sometimes when I rebind the datasource at runtime, the grid just turns into a big red x. Most of the time the rebinding works.
I can't debug or trace what/where the error might be or why the grid is doing this. So i close the form and reopen it and it works fine.
Has anyone else experienced this? Any ideas for debugging?
Thanks,
Bill
Hi Bill,
A big red X usually means that an exception was raised during the Paint event of a control. Unfortunately, there's really no great way to debug this, but is sometimes displays the exception and call stack in the control itself (under the X). So if there is any information there, it might help.
One of the most common causes of an issue like this is improper use of multiple threads. If you updated the data source on another thread (other than the UI thread) wihout properly marshalling the data, it can cause this sort of thing.