Version

RecurrenceEditType Property (BeforeRecurringAppointmentDeletedEventArgs)

Determines whether the entire series or only the individual occurrence will be deleted, or if the user will be prompted to select.
Syntax
'Declaration
 
Public Property RecurrenceEditType As RecurrenceEditType
public RecurrenceEditType RecurrenceEditType {get; set;}
Example
The following example demonstrates how to use the parameters of the 'BeforeRecurringAppointmentDeleted' event.

For an overview of how to handle events in Visual Basic or Visual C#, see Event Handlers in Visual Basic and Visual C#. For specific information and code examples illustrating how to consume events in your application, see Consuming Events in the .NET Framework Developer's Guide.

Imports Infragistics.Shared
Imports Infragistics.Win
Imports Infragistics.Win.UltraWinSchedule
Imports System.Diagnostics

	Private Sub ultraCalendarInfo1_BeforeRecurringAppointmentDeleted(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinSchedule.BeforeRecurringAppointmentDeletedEventArgs) Handles ultraCalendarInfo1.BeforeRecurringAppointmentDeleted
		' The 'BeforeRecurringAppointmentDeleted' is invoked before a
		' recurring appointment is deleted and provides a chance to 
		' prevent the deletion or modify what the user is deleting.
		'

		' The 'RecurrenceEditType' parameter is used to determine
		' what will be deleted. When left to the default of 'UserSelect',
		' the user will be prompted whether they would like to 
		' delete the individual occurrence or the entire series.
		' This property can also be changed here to prevent that prompt.

		' The following code only allows the user to remove
		' occurances of a recurring appointment unless the
		' appointment has not begun yet.
		'
		If e.Appointment.StartDateTime > DateTime.Now Then
			e.RecurrenceEditType = RecurrenceEditType.Series
		Else
			e.RecurrenceEditType = RecurrenceEditType.Occurrence
		End If

		' To prevent the deletion of the appointment, set the 
		' 'Cancel' parameter to true
		If e.Recurrence.PatternFrequency = RecurrencePatternFrequency.Yearly Then
			e.Cancel = True
		End If
	End Sub
using Infragistics.Shared;
using Infragistics.Win;
using Infragistics.Win.UltraWinSchedule;
using System.Diagnostics;

		private void ultraCalendarInfo1_BeforeRecurringAppointmentDeleted(object sender, Infragistics.Win.UltraWinSchedule.BeforeRecurringAppointmentDeletedEventArgs e)
		{
			// The 'BeforeRecurringAppointmentDeleted' is invoked before a
			// recurring appointment is deleted and provides a chance to 
			// prevent the deletion or modify what the user is deleting.
			//

			// The 'RecurrenceEditType' parameter is used to determine
			// what will be deleted. When left to the default of 'UserSelect',
			// the user will be prompted whether they would like to 
			// delete the individual occurrence or the entire series.
			// This property can also be changed here to prevent that prompt.

			// The following code only allows the user to remove
			// occurances of a recurring appointment unless the
			// appointment has not begun yet.
			//
			if (e.Appointment.StartDateTime > DateTime.Now)
				e.RecurrenceEditType = RecurrenceEditType.Series;
			else
				e.RecurrenceEditType = RecurrenceEditType.Occurrence;

			// To prevent the deletion of the appointment, set the 
			// 'Cancel' parameter to true
			if (e.Recurrence.PatternFrequency == RecurrencePatternFrequency.Yearly)
				e.Cancel = true;
		}
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also