Home Forums WinForms controls Xceed Grid for WinForms System.ObjectDisposedException: Cannot access a disposed object

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

    Hi,

    My program is multi-threaded, and there are constantly updates made onto the grid (either by user manually, or by other thread automatically). I got this System.ObjectDisposedException error when I try to close the form. I tried, in my code, to check that the form is not null and is visible before attempting to update the grid on the form. But since my program is multi-threaded, I guess update could be made to the grid at any point. And thus, I could get this error. Can you please suggest a solution to this? I guess I can catch this error in try-catch block as a workaround. But I wonder of a nicer way for this.

    Thanks!

     

    Imported from legacy forums. Posted by Sop (had 739 views)

    User (Old forums)
    Member
    Post count: 23064

    Except verifying the form is still valid from the other threads, we don’t see other ways of doing this.

    Imported from legacy forums. Posted by André (had 737 views)

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