We have had a reoccurring error everytime we’ve attempted to thread a form that uses the Xceed Grid. It’s completely intermittent, so it’s hard to track down, but it’s always the same error:
“An attempt was made to update the PaintManager while it is already updating”
Stack: at Xceed.Grid.PaintManager.Update() at Xceed.Grid.PaintManager.GetVisualGridElementAtPoint(Int32 x, Int32 y) at Xceed.Grid.GridControl.OnMouseMove(MouseEventArgs e) at System.Windows.Forms.Control.WmMouseMove(Message& m) etc.
This error is followed by the grid being replaced by the big red X.
Our grid is not currently bound, but we’ve done stuff like beginInit()/endInit() and similar. Is there something that we’re missing in updating the data in the grid from another thread? Is it possible to suspend the PaintManager from another thread?
Another person posted a similar error elsewhere on this forum, but nobody had an answer… anybody have thoughts for me?
Imported from legacy forums. Posted by MatthewTheRaven (had 2925 views)
Yes I did. They responded back that anything that would affect the look of the gridControl must be called/set in the main UI thread.
Does this include simply adding or removing rows?
Also, they indicated that one could use the grid’s .Invoke method and a delegate in order to do this properly. It seems that the grid painting is ignoring the fact that the grid has been locked elsewhere. Is this true? Is it possible to suspend the painting of the grid while the grid is locked?
Thanks for the quick response! Matt
Imported from legacy forums. Posted by MatthewTheRaven (had 283 views)