FullCalendar - The collection has been modified. The enumeration operation may not be performed (v.2.2.43)

0
0

Hi everyone!
I have some issues with updating events in the FullCalendar.

 

We have developed an application with real-time updates for the DataGridView and FullCalendar, we need to keep all the events in the calendar, for every client connected, updated.

While doing an update with an Application.StartTask() some times the Full Calendar throws an error which can’t be catched. (see Exception.png).

I made a small project trying to replicate this issue.

If you load and then update the Events in the example the popup will show up.

NOTE: I use the NuGet packages for both Wisej and Wisej.FullCalendar, i think you might need to restore the packages.

 

Best regards,

Alex.

  • You must to post comments
0
0

Hi Luca, i tried the solution you said, in the Project attached before.

I moved the lock(_events) in the click event for the button like so

private void button2_Click(object sender, EventArgs e)
{
lock (_events)
{
UpdateCalendar();
}
}

But it still doesn’t work and the exception still shows up.

 

  • You must to post comments
0
0

Try to lock the Events collection when you update it in the other thread. What’s happening is that the task is altering the events collection while the data read handler is returning it to the client. In the Wisej extension the data read handler is synchronized on the Events collection.

  • You must to post comments
Showing 2 results
Your Answer

Please first to submit.