バージョン

BeforeAppointmentEdit イベント

ユーザーインターフェイスを使用して Appointment オブジェクトが編集される前に発生します。
シンタックス
'宣言
 
Public Event BeforeAppointmentEdit As BeforeAppointmentEditEventHandler
public event BeforeAppointmentEditEventHandler BeforeAppointmentEdit
イベント データ

イベント ハンドラが、このイベントに関連するデータを含む、BeforeAppointmentEditEventArgs 型の引数を受け取りました。次の BeforeAppointmentEditEventArgs プロパティには、このイベントの固有の情報が記載されます。

プロパティ解説
Appointment 編集しようとしている予定を返します。
Cancel System.ComponentModel.CancelEventArgsから継承されます。 
解説

BeforeAppointmentEdit イベントはキャンセル可能なイベントです。イベントがキャンセルされると、対応する Appointment オブジェクトのインプレース エディターは表示しません。またそのような場合、BeforeAppointmentEdit イベントは発生しません

使用例
Private Sub UltraMonthViewSingle1_BeforeAppointmentEdit(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinSchedule.BeforeAppointmentEditEventArgs) Handles ultraMonthViewSingle.BeforeAppointmentEdit

    '----------------------------------------------------------------------------------------------------
    '	説明
    '	BeforeAppointmentEdit
    '
    '	コントロール UI で Appointment の件名が編集される前に発生します
    '	イベントがキャンセルされた場合、Appointment の編集は無効になり、AfterAppointmentEdit 
    '	イベントを発生しません
    '
    '----------------------------------------------------------------------------------------------------

    '	予定が複数日をまたぐかどうかを決定します
    If e.Appointment.StartDateTime.Date <> e.Appointment.EndDateTime.Date Then

        '	複数日の予定であるため、予定を編集する許可がないことを通知し、
        '	イベントの 'Cancel' プロパティを True に設定すると、
        '	イベントをキャンセルします
        MessageBox.Show("You do not have the appropriate permissions to edit this Appointment.", "Access Denied", MessageBoxButtons.OK, MessageBoxIcon.Error)
        e.Cancel = True
        Return
    End If

    '	予定の曜日を取得します
    Dim dow As System.DayOfWeek = e.Appointment.StartDateTime.DayOfWeek

    '	予定が土曜日または日曜日以外の曜日にある場合、
    '	編集を無効にします
    If dow <> System.DayOfWeek.Saturday And dow <> System.DayOfWeek.Sunday Then
        MessageBox.Show("You do not have the appropriate permissions to edit this Appointment.", "Access Denied", MessageBoxButtons.OK, MessageBoxIcon.Error)
        e.Cancel = True
        Return
    End If

End Sub
private void ultraMonthViewSingle1_BeforeAppointmentEdit(object sender, Infragistics.Win.UltraWinSchedule.BeforeAppointmentEditEventArgs e)
{		
	//----------------------------------------------------------------------------------------------------
	//	説明
	//	BeforeAppointmentEdit
	//
	//	コントロール UI で Appointment の件名が編集される前に発生します
	//	イベントがキャンセルされた場合、Appointment の編集は無効になり、AfterAppointmentEdit
	//	イベントを発生しません
	//
	//----------------------------------------------------------------------------------------------------

	//	予定が複数日をまたぐかどうかを決定します
	if ( e.Appointment.StartDateTime.Date != e.Appointment.EndDateTime.Date )
	{
		//	複数日の予定であるため、予定を編集する許可がないことを通知し、
		//	イベントの 'Cancel' プロパティを True に設定すると、
		//	イベントをキャンセルします
		MessageBox.Show( "You do not have the appropriate permissions to edit this Appointment.", "Access Denied", MessageBoxButtons.OK, MessageBoxIcon.Error );
		e.Cancel = true;
		return;
	}

	//	予定の曜日を取得します
	System.DayOfWeek dow = e.Appointment.StartDateTime.DayOfWeek;

	//	予定が土曜日または日曜日以外の曜日にある場合、
	//	編集を無効にします
	if ( dow != System.DayOfWeek.Saturday && dow != System.DayOfWeek.Sunday )
	{
		MessageBox.Show( "You do not have the appropriate permissions to edit this Appointment.", "Access Denied", MessageBoxButtons.OK, MessageBoxIcon.Error );
		e.Cancel = true;
		return;
	}

}
参照