Home Forums WinForms controls Xceed Grid for WinForms Error while updating the PaintManager

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #13046 |

    Hello,

    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?

    Thanks!
    Matt

    Imported from legacy forums. Posted by MatthewTheRaven (had 2925 views)

    Odi [Xceed]
    Spectator
    Post count: 426

    I just want to check: Did you ask this question to Xceed support?

    Odi

    Imported from legacy forums. Posted by Odi [Xceed] (had 295 views)

    User (Old forums)
    Member
    Post count: 23064

    Hi there,

    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)

    User (Old forums)
    Member
    Post count: 23064

    “Does this include simply adding or removing rows? “

    Yes

    Imported from legacy forums. Posted by C# (had 4077 views)

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.