Cannot access a disposed object. Object name: 'GridViewSynchronizationService'.
Scenario: This error only appears to happen when I'm utilizing an EventLogEntryCollection as the datasource and refreshing the datasource via a timer event. The form is a simple event log monitor.
The error occurs randomly on either of these lines (this is from within a custom control):
The above DataCache object is a dynamic property that is populated by the code below.
EventLog e =
The above snippet is from a form that is consuming the custom datagrid control (so the dgResults object is distinguishable for anyone reading).
.dgResults.DataSource = e.Entries;
I can't recreate the issue as it just randomly appears from time to time.
Hopefully this is a known issue of some type and there is an easy fix. I saw that clearing the relations might work, but that doesn't seem to be working for me.
Ideas anyone? Thanks in advance! Let me know if more is required.