Scheduler for WinForms | ComponentOne
C1.Win.C1Schedule.4.5.2 Assembly / C1.Win.C1Schedule Namespace / C1Schedule Class / AppointmentCustomAction Event
Example

In This Topic
    AppointmentCustomAction Event (C1Schedule)
    In This Topic
    Occurs immediately before a custom action of an C1.C1Schedule.Appointment object executes.
    Syntax
    'Declaration
     
    Public Event AppointmentCustomAction As CancelAppointmentEventHandler
    public event CancelAppointmentEventHandler AppointmentCustomAction
    Event Data

    The event handler receives an argument of type CancelAppointmentEventArgs containing data related to this event. The following CancelAppointmentEventArgs properties provide information specific to this event.

    PropertyDescription
    Gets the Appointment object which the event was raised for.  
    (Inherited from System.ComponentModel.CancelEventArgs)
    Remarks
    To cancel default handling, set CancelAppointmentEventArgs.Cancel property to true.
    Example
    private void c1Schedule1_AppointmentAdded(object sender, AppointmentEventArgs e)
    {
    	// create a new action
    	Action action = new Action();
    	action.Command = "http://www.grapecity.com";
    	// set appointment action
    	e.Appointment.Action = action;
    }
    See Also