Home Forums WinForms controls Xceed Grid for WinForms Cross-thread operation not valid Reply To: Cross-thread operation not valid

User (Old forums)
Member
Post count: 23064

Working with a customer on this, we may have found a problem, but since we do not reproduce it here, it is a bit difficult to be sure.  There may be a workaround for the issue, but we did not test it on our side.  However, it worked for the customer I mentioned.

Before closing the form containing the grid, set the CellEditorManager to null on the columns on which you have NOT set a CellEditorManager, and then call ResetCellEditorManager(). This way, the DEFAULT editor should be correctly released before the GC tries to clean it up, and it may prevent the exception.  If you delete a column without closing the grid, you can do the same, as you would likely have the same exception if you don’t.

e.g.:

gridControl1.Columns[

“column1” ].CellEditorManager = null;

gridControl1.Columns[

“column1” ].ResetCellEditorManager();

 

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