windowsforms-devexpress-dot-xtrascheduler-dot-googlecalendar-dot-dxgooglecalendarsync-103da376.md
Raises when the DXGoogleCalendarSync component is uncertain whether it should copy Scheduler Appointment data to a corresponding Google Event, or vice versa.
Namespace : DevExpress.XtraScheduler.GoogleCalendar
Assembly : DevExpress.XtraScheduler.v25.2.GoogleCalendar.dll
NuGet Package : DevExpress.Win.Scheduler.GoogleCalendar
public event ConflictDetectedEventHandler ConflictDetected
Public Event ConflictDetected As ConflictDetectedEventHandler
The ConflictDetected event's data class is ConflictDetectedEventArgs. The following properties provide information specific to this event:
| Property | Description |
|---|---|
| Appointment | Provides access to a Scheduler Appointment associated with this conflict. |
| ConflictOperationType | Returns the conflict type. Allows you to determine whether the conflict has emerged for a newly created or an edited Event/Appointment. |
| Event | Provides access to a Google Event associated with this conflict. |
| GoogleEventIsValid | Gets or sets whether the DXGoogleCalendarSync should copy a Google Event data into a Scheduler Appointment. |
The ConflictDetected event occurs, for instance, when you edit both a Scheduler Appointment and its corresponding Google Event. This produces an ambiguous scenario where it is unclear which of the Event-Appointment objects should be considered “valid”. Handle the ConflictDetected event to manually choose this “valid” object.
private void GcSyncComponent_ConflictDetected(object sender, ConflictDetectedEventArgs e) {
if (
//implement your condition here
//you can read the e.Appointment and e.Event parameters to compare conflicting objects
) {
e.GoogleEventIsValid = false;
}
}
Private Sub GcSyncComponent_ConflictDetected(ByVal sender As Object, ByVal e As ConflictDetectedEventArgs)
If Then
'implement your condition here
'you can read the e.Appointment and e.Event parameters to compare conflicting objects
e.GoogleEventIsValid = False
End If
End Sub
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ConflictDetected event.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
winforms-scheduler-sync-with-google-calendars/CS/GCSync/Form1.cs#L33
bbiSynchronize.ItemClick += BbiSynchronize_ItemClick;
gcSyncComponent.ConflictDetected += GcSyncComponent_ConflictDetected;
winforms-scheduler-sync-with-google-calendars/VB/GCSync/Form1.vb#L39
AddHandler bbiSynchronize.ItemClick, AddressOf BbiSynchronize_ItemClick
AddHandler gcSyncComponent.ConflictDetected, AddressOf GcSyncComponent_ConflictDetected
End Sub
See Also