WinForms

Code Examples Upgrade Guide User Guide Demos Support Forums Download
  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class ScheduleControl

    Show / Hide Table of Contents

    Class ScheduleControl

    Represents a control that provides the basic scheduling functionality. It serves as a wrapper class for a ScheduleGrid and a NavigationCalendar that work together to provide this scheduling functionality.

    Inheritance
    System.Object
    ScheduleControl
    Namespace: Syncfusion.Windows.Forms.Schedule
    Assembly: Syncfusion.Schedule.Windows.dll
    Syntax
    public class ScheduleControl : UserControl
    Remarks

    To use the ScheduleControl, place it on Form or UserControl, and then set its DataSource property to an object that implements IScheduleDataProvider that provides a data store for the schedule items that you want to use in the ScheduleControl. If you do not set ScheduleControl.DataSource, then an IScheduleDataProvider implementation based on ArrayLists will be used. See ArrayListDataProvider for more information.

    Constructors

    ScheduleControl()

    Initializes a new instance of the ScheduleControl class.

    Declaration
    public ScheduleControl()

    Properties

    AlertWindow

    Gets the AlertForm that displays the alerts.

    Declaration
    public AlertForm AlertWindow { get; }
    Property Value
    Type Description
    AlertForm

    AllowAdjustAppointmentsWithMouse

    Gets or sets a value indicating whether the user can change an appointment time or date with the mouse.

    Default value is true.

    Declaration
    public bool AllowAdjustAppointmentsWithMouse { get; set; }
    Property Value
    Type Description
    System.Boolean

    AllowSecondsInAppointment

    Gets or sets enable seconds support for schedule appointment.

    Declaration
    public bool AllowSecondsInAppointment { get; set; }
    Property Value
    Type Description
    System.Boolean

    Appearance

    Gets or sets a ScheduleAppearance object that controls the visual properties of the ScheduleControl.

    Declaration
    public ScheduleAppearance Appearance { get; set; }
    Property Value
    Type Description
    ScheduleAppearance

    Calendar

    Gets the NavigationCalendar associated with ScheduleControl.

    Declaration
    public NavigationCalendar Calendar { get; }
    Property Value
    Type Description
    NavigationCalendar
    Remarks

    The NavigationCalendar is a derive GridControl that displays one or more Calendars that let the user select dates to be displayed in the ScheduleControl. If you want to use a derived NavigationCalendar, then you can do so by overriding CreateNavigationCalendar and returning an instance of your derived NavigationCalendar.

    CaptionPanel

    Gets the Panel, holding the caption above the Calendar. This panel may hold two navigation buttons and HeaderLabel.

    Declaration
    public Panel CaptionPanel { get; }
    Property Value
    Type Description
    System.Windows.Forms.Panel

    Culture

    Gets or sets the culture used for the date formatting.

    Declaration
    public CultureInfo Culture { get; set; }
    Property Value
    Type Description
    System.Globalization.CultureInfo
    Remarks

    Defaults to the CultureInfo.InvariantCulture setting.

    DataSource

    Gets or sets the data source for the ScheduleControl.

    Declaration
    public IScheduleDataProvider DataSource { get; set; }
    Property Value
    Type Description
    IScheduleDataProvider

    DisplayTimeSpansInEndTimeDropDown

    Gets or sets a value indicating whether the EndTime dropdown in the AppointmentForm tries to parenthetically display the time span in minutes.

    Default value is true.

    Declaration
    public static bool DisplayTimeSpansInEndTimeDropDown { get; set; }
    Property Value
    Type Description
    System.Boolean

    EnableAlerts

    Gets or sets a value indicating whether the alerts should be raised as appointment time approaches.

    Declaration
    public bool EnableAlerts { get; set; }
    Property Value
    Type Description
    System.Boolean
    Remarks

    Setting this property to true dynamically creates the AlertWindow used by this ScheduleControl. Setting it to false will dispose of the associated AlertWindow.

    EnableTouchMode

    Gets or sets a value indicating whether the control enables the touch mode.

    Declaration
    public bool EnableTouchMode { get; set; }
    Property Value
    Type Description
    System.Boolean

    HeaderLabel

    Gets or sets the Label Control that serves as the caption at the top of the ScheduleControl.

    Declaration
    public virtual Label HeaderLabel { get; set; }
    Property Value
    Type Description
    System.Windows.Forms.Label

    ISO8601CalenderFormat

    Gets or sets a value indicating whether ISO 8601 calendar format is applied or not.

    Declaration
    public bool ISO8601CalenderFormat { get; set; }
    Property Value
    Type Description
    System.Boolean

    ItemSelected

    Gets a value indicating whether an ISchedule item has input focus (i.e., has been clicked)

    Declaration
    public bool ItemSelected { get; }
    Property Value
    Type Description
    System.Boolean
    Remarks

    You can use this property to determine whether menu items should be enabled.

    MaxAppointment

    Gets or sets the maximum appointment count.

    Declaration
    public int MaxAppointment { get; set; }
    Property Value
    Type Description
    System.Int32
    Remarks

    Set a minimum value for this if you use maximum value, it will decrease the performance of schedule grid.

    NavigationPanel

    Gets or sets the panel where you can place additional controls and have them appear adjacent to the ScheduleControl.

    Declaration
    public Panel NavigationPanel { get; }
    Property Value
    Type Description
    System.Windows.Forms.Panel

    NavigationPanelFillWithCalendar

    Gets or sets a value indicating whether the Calendar occupies the entire NavigationPanel and sizes dynamically as the ScheduleControl is sized.

    Declaration
    public bool NavigationPanelFillWithCalendar { get; set; }
    Property Value
    Type Description
    System.Boolean

    NavigationPanelPosition

    Gets the location of the NavigationPanel.

    Declaration
    public CalendarNavigationPanelPosition NavigationPanelPosition { get; set; }
    Property Value
    Type Description
    CalendarNavigationPanelPosition

    ScheduleType

    Gets or sets a value indicating whether a daily, weekly or monthly schedule is displayed.

    Declaration
    public ScheduleViewType ScheduleType { get; set; }
    Property Value
    Type Description
    ScheduleViewType

    ShowAllSpansInAllDayPanel

    Gets or sets a value indicating whether non-AllDay multiday appointments are displayed in the AllDay area of the Day, WorkWeek and CustomDay views.

    Default value is false.

    Declaration
    public bool ShowAllSpansInAllDayPanel { get; set; }
    Property Value
    Type Description
    System.Boolean
    Remarks

    By default, if a multi-day appointment is not marked as AllDay, this appoint will not show across multiple days in WorkWeek or CustomDay views. Instead, the appointment is shown only in the appropriate time slots during the day. Setting ShowAllSpansInAllDayPanel to true will also show non-AllDay multiday appointments across multiple days.

    ShowMultiDayAppointmentsAsSpans

    Gets or sets a value indicating whether the multiday appointments are displayed across days in Month, Day, WorkWeek and CustomDay views.

    Default value is true.

    Declaration
    public bool ShowMultiDayAppointmentsAsSpans { get; set; }
    Property Value
    Type Description
    System.Boolean
    Remarks

    When this property is set to true (the default setting) and the DataSource implements IRecurringScheduleDataProvider, then an AllDay appointment that spans more than one day will display as a single panel across the multiple-day span of the appointment for ScheduleViewTypes Day, CustomWeek, WorkWeek and Month (but not Week). When an appointment is shown as a multiday span, the user will not be able to use the mouse to change the day span or drag it to a new location. The only way to edit such spans is through the Edit dialog which normally appears on a double left-click or from the right-click context menu.

    ShowRoundedCorners

    Gets or sets a value indicating whether the appointments are displayed with rounded corners.

    Default value is false.

    Declaration
    public bool ShowRoundedCorners { get; set; }
    Property Value
    Type Description
    System.Boolean

    SwitchViewStyle

    Gets or sets a value indicating whether the view style should be changed in the Control

    Default value is true.

    Declaration
    public bool SwitchViewStyle { get; set; }
    Property Value
    Type Description
    System.Boolean

    UseMirroredFormsWithRTL

    Gets or sets a value indicating whether the forms used with editing appointments are mirrored when ScheduleControl.RightToLeft is set to Yes.

    Default value is true.

    Declaration
    public static bool UseMirroredFormsWithRTL { get; set; }
    Property Value
    Type Description
    System.Boolean

    Methods

    AddControlToNavigationPanel(Control)

    Adds a Control to the NavigationPanel underneath the NavigationCalendar.

    Declaration
    public void AddControlToNavigationPanel(Control c)
    Parameters
    Type Name Description
    System.Windows.Forms.Control c

    The Control to be added.

    AddSpanAppointment(IRecurringScheduleAppointment, IRecurringScheduleDataProvider)

    Adds a multiday span appointment to a dataProvider.

    Declaration
    public void AddSpanAppointment(IRecurringScheduleAppointment item, IRecurringScheduleDataProvider dataProvider)
    Parameters
    Type Name Description
    IRecurringScheduleAppointment item

    Holds the appointment to be added.

    IRecurringScheduleDataProvider dataProvider

    The DataProvider.

    Remarks

    Multiday appointments are not simply single entries in the appointment list. This method takes the information in an IRecurringScheduleAppointment and adds it to the DataProvider as a span appointment covering more than a single day. The process properly populates the IRecurringScheduleAppointment.DateList collection.

    AddSpanAppointment(IRecurringScheduleAppointment, IRecurringScheduleDataProvider, Int32, Int32)

    Adds a multiday span appointment to a dataProvider.

    Declaration
    public static void AddSpanAppointment(IRecurringScheduleAppointment item, IRecurringScheduleDataProvider dataProvider, int startHour, int endHour)
    Parameters
    Type Name Description
    IRecurringScheduleAppointment item

    Holds the appointment to be added.

    IRecurringScheduleDataProvider dataProvider

    The DataProvider.

    System.Int32 startHour

    The cutoff value for the start Hour of the daily appointments.

    System.Int32 endHour

    The cutoff value for the end Hour of the daily appointments. Use 0 for midnight.

    Remarks

    Multiday appointments are not simply single entries in the appointment list. This method takes the information in an IRecurringScheduleAppointment and adds it to the DataProvider as a span appointment covering more than a single day. The process properly populates the IRecurringScheduleAppointment.DateList collection. The startHour and endHour can be used to limit the daily time span for the appointment slots. For example, the code below will limit the appointment to the PrimeTime hours as set in a ScheduleControls.Appearance object. To have no restrictions on the time slots, pass zeros for both startHour and endHour.

    Examples
        ArrayListAppointment item = new ArrayListAppointment();
        item.Subject = "Blue Production Run";
        item.StartTime = new DateTime(2008, 11, 12, 9, 0, 0);
        item.EndTime = new DateTime(2008, 11, 14, 10, 30, 0);
        item.AllDay = false;
        item.LabelValue = 3;
        int startHour = ScheduleGrid.SpanOnlyPrimeTime ? scheduleControl1.Appearance.PrimeTimeStart : 0;
        int endHour = ScheduleGrid.SpanOnlyPrimeTime ? scheduleControl1.Appearance.PrimeTimeEnd : 0;
        ScheduleControl.AddSpanAppointment(item, myArrayListDataProvider, startHour, endHour);

    ApplyCultureToAppearance(CultureInfo, ScheduleAppearance)

    Applied the culture to the ScheduleControl. This method is called by the ScheduleControl when the ScheduleControl.Culture property is set to move the specific culture settings to the Appearance object.

    Declaration
    public virtual void ApplyCultureToAppearance(CultureInfo currentCultureInfo, ScheduleAppearance currentAppearance)
    Parameters
    Type Name Description
    System.Globalization.CultureInfo currentCultureInfo

    The new Culture.

    ScheduleAppearance currentAppearance

    The Appearance object to be set.

    Remarks

    Override this method to control how your Culture settings will affect the Appearance. The default settings are as below

    currentAppearance.WorkWeekHeaderFormat = currentCultureInfo.DateTimeFormat.ShortDatePattern;
    currentAppearance.WeekHeaderFormat = currentCultureInfo.DateTimeFormat.MonthDayPattern;
    currentAppearance.WeekMonthFullFormat = currentCultureInfo.DateTimeFormat.LongDatePattern;
    currentAppearance.WorkWeekHeaderFormat = currentCultureInfo.DateTimeFormat.ShortDatePattern
    currentAppearance.WeekHeaderFormat = currentCultureInfo.DateTimeFormat.MonthDayPattern
    currentAppearance.WeekMonthFullFormat = currentCultureInfo.DateTimeFormat.LongDatePattern

    CreateNavigationCalendar()

    Override this method to have a derived ScheduleControl use a derived NavigationCalendar.

    Declaration
    public virtual NavigationCalendar CreateNavigationCalendar()
    Returns
    Type Description
    NavigationCalendar

    A NavigationCalendar object that this ScheduleControl will use as its Calendar object.

    CreateScheduleGrid(NavigationCalendar, ScheduleControl, DateTime)

    Creates the ScheduleGrid used by this ScheduleControl.

    Declaration
    public virtual ScheduleGrid CreateScheduleGrid(NavigationCalendar calendar, ScheduleControl schedule, DateTime initialDate)
    Parameters
    Type Name Description
    NavigationCalendar calendar

    The NavigationCalendar to be used by this ScheduleControl.

    ScheduleControl schedule

    The ScheduleControl that is the parent of this ScheduleGrid.

    System.DateTime initialDate

    The initial DateTime to be displayed.

    Returns
    Type Description
    ScheduleGrid

    ScheduleGrid used by this ScheduleControl.

    Remarks

    Override this method if you want your ScheduleControl to use a derived ScheduleGrid.

    DefaultWindowsFormsContextMenu()

    Gets a default ContextMenu implementing standard set of menu items.

    Declaration
    public ContextMenu DefaultWindowsFormsContextMenu()
    Returns
    Type Description
    System.Windows.Forms.ContextMenu

    A ContextMenu.

    Remarks

    If you use this default implementation of a ContextMenu, you can dynamically cancel the execution of a menu selection by subscribing to the ScheduleControl.ScheduleAppointmentClick event and setting e.Cancel = true when e.ClickType is RightClick.

    Dispose(Boolean)

    Clean up any resources being used.

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing

    Indicates whether components has to be disposed.

    GetItemAtPoint(Point, out ItemHitType)

    Gets the information about the IScheduleAppointment if any under the point.

    Declaration
    public IScheduleAppointment GetItemAtPoint(Point pt, out ItemHitType hit)
    Parameters
    Type Name Description
    System.Drawing.Point pt

    The Point to be tested.

    ItemHitType hit

    Returns information regarding the the location of the point.

    Returns
    Type Description
    IScheduleAppointment

    The IScheduleAppointment under the point. Returns null if no item under the point.

    GetScheduleHost()

    Gets the ScheduleGrid that holds the schedule.

    Declaration
    public ScheduleGrid GetScheduleHost()
    Returns
    Type Description
    ScheduleGrid

    A ScheduleGrid.

    Remarks

    The ScheduleGrid is a GridControl derived class that displays the IScheduleAppointments. The appearance and layout of this grid varies with the ScheduleViewType.

    MetroContextMenu()

    Gets a Metro ContextMenu implementing standard set of menu items for metro theme

    Declaration
    public ContextMenuStrip MetroContextMenu()
    Returns
    Type Description
    System.Windows.Forms.ContextMenuStrip

    A ContextMenu.

    Remarks

    If you use this default implementation of a ContextMenu, you can dynamically cancel the execution of a menu selection by subscribing to the ScheduleControl.ScheduleAppointmentClick event and setting e.Cancel = true when e.ClickType is RightClick.

    OnAdjustingAppointmentWithMouse(AdjustingAppointmentMouseWithEventArgs)

    Raises the AdjustingAppointmentWithMouse event.

    Declaration
    public virtual void OnAdjustingAppointmentWithMouse(AdjustingAppointmentMouseWithEventArgs e)
    Parameters
    Type Name Description
    AdjustingAppointmentMouseWithEventArgs e

    The event arguments.

    Remarks

    Raises a AdjustingAppointmentWithMouse event that lets you cancel appointment by appointment whether an appointment can be adjusted using the mouse.

    OnAppointmentTimeChanged(AppointmentTimeChangedEventArgs)

    Raises the AppointmentTimeChanged event.

    Declaration
    protected virtual void OnAppointmentTimeChanged(AppointmentTimeChangedEventArgs e)
    Parameters
    Type Name Description
    AppointmentTimeChangedEventArgs e

    The AppointmentTimeChanged that contains the event data.

    OnItemChanged(ScheduleAppointmentEventArgs)

    Raises an ItemChanged event.

    Declaration
    protected virtual void OnItemChanged(ScheduleAppointmentEventArgs e)
    Parameters
    Type Name Description
    ScheduleAppointmentEventArgs e

    The ScheduleAppointmentEventArgs that contains the event data.

    OnItemChanging(ScheduleAppointmentCancelEventArgs)

    Raises an ItemChanging event.

    Declaration
    protected virtual void OnItemChanging(ScheduleAppointmentCancelEventArgs e)
    Parameters
    Type Name Description
    ScheduleAppointmentCancelEventArgs e

    The ScheduleAppointmentCancelEventArgs that contains the event data.

    OnParseDisplayItem(ParseDisplayItemEventArgs)

    Raises the ParseDisplayItem event.

    Declaration
    protected virtual void OnParseDisplayItem(ParseDisplayItemEventArgs e)
    Parameters
    Type Name Description
    ParseDisplayItemEventArgs e

    The ParseDisplayItemEventArgs that contains the event data.

    OnRightToLeftChanged(EventArgs)

    Overridden to switch the right to left view.

    Declaration
    protected override void OnRightToLeftChanged(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    The System.EventArgs that contains the event data.

    OnScheduleAppointmentClick(ScheduleAppointmentClickEventArgs)

    Raises the ScheduleAppointmentClick event.

    Declaration
    public virtual void OnScheduleAppointmentClick(ScheduleAppointmentClickEventArgs e)
    Parameters
    Type Name Description
    ScheduleAppointmentClickEventArgs e

    The ScheduleAppointmentClickEventArgs that contains the event data.

    OnScheduleContextMenuClick(ScheduleContextMenuClickEventArgs)

    /// Raises the ScheduleContextMenuClick event.

    Declaration
    public virtual void OnScheduleContextMenuClick(ScheduleContextMenuClickEventArgs e)
    Parameters
    Type Name Description
    ScheduleContextMenuClickEventArgs e

    The ScheduleContextMenuClickEventArgs that contains the event data.

    OnScheduleGridCreated(ScheduleGridCreatedEventArgs)

    Raises the ScheduleGridCreated event.

    Declaration
    public virtual void OnScheduleGridCreated(ScheduleGridCreatedEventArgs e)
    Parameters
    Type Name Description
    ScheduleGridCreatedEventArgs e

    The event arguments.

    Remarks

    Raises a ScheduleGridCreated event that lets you either use a derived ScheduleGridControl or to subscribe to events on the ScheduleGridControl.

    OnSetupContextMenu()

    Sets up the context menu associated with the ScheduleControl.

    Declaration
    public virtual void OnSetupContextMenu()
    Remarks

    Override this method to create your own context menus.

    OnShowingAppointmentForm(ShowingAppointFormEventArgs)

    Raises the ShowingAppointmentForm event.

    Declaration
    protected virtual void OnShowingAppointmentForm(ShowingAppointFormEventArgs e)
    Parameters
    Type Name Description
    ShowingAppointFormEventArgs e

    The ShowingAppointFormEventArgs that contains the event data.

    PerformDeleteItemClick()

    Displays a dialog allowing you to delete an IScheduleAppointment.

    Declaration
    public void PerformDeleteItemClick()

    PerformEditItemClick()

    Displays a dialog allowing you to edit an IScheduleAppointment.

    Declaration
    public void PerformEditItemClick()

    PerformNewAllDayItemClick()

    Displays a Dialog allowing you to enter a new AllDay IScheduleAppointment.

    Declaration
    public void PerformNewAllDayItemClick()

    PerformNewItemClick()

    Displays a dialog allowing you to enter a new IScheduleAppointment.

    Declaration
    public void PerformNewItemClick()

    PerformSwitchToScheduleViewTypeClick(ScheduleViewType)

    Switches the display to the specified ScheduleViewType.

    Declaration
    public void PerformSwitchToScheduleViewTypeClick(ScheduleViewType t)
    Parameters
    Type Name Description
    ScheduleViewType t

    The requested ScheduleViewType.

    RaiseAppointmentTimeChanged(AppointmentTimeChangedEventArgs)

    Raises the AppointmentTimeChanged event.

    Declaration
    public virtual void RaiseAppointmentTimeChanged(AppointmentTimeChangedEventArgs e)
    Parameters
    Type Name Description
    AppointmentTimeChangedEventArgs e

    An AppointmentTimeChanged that contains the event data.

    RaiseItemChanged(ScheduleAppointmentEventArgs)

    Raises an ItemChanged event.

    Declaration
    public void RaiseItemChanged(ScheduleAppointmentEventArgs e)
    Parameters
    Type Name Description
    ScheduleAppointmentEventArgs e

    The event arguments.

    RaiseItemChanging(ScheduleAppointmentCancelEventArgs)

    Raises an ItemChanging event.

    Declaration
    public void RaiseItemChanging(ScheduleAppointmentCancelEventArgs e)
    Parameters
    Type Name Description
    ScheduleAppointmentCancelEventArgs e

    The event arguments.

    RaiseParseDisplayItem(ParseDisplayItemEventArgs)

    Raises the ParseDisplayItem event.

    Declaration
    public void RaiseParseDisplayItem(ParseDisplayItemEventArgs e)
    Parameters
    Type Name Description
    ParseDisplayItemEventArgs e

    The ParseDisplayItemEventArgs that contains the event data.

    Remarks

    Internal use only.

    RaiseShowingAppointmentForm(ShowingAppointFormEventArgs)

    Raises the ShowingAppointmentForm event.

    Declaration
    public virtual void RaiseShowingAppointmentForm(ShowingAppointFormEventArgs e)
    Parameters
    Type Name Description
    ShowingAppointFormEventArgs e

    The ShowingAppointFormEventArgs that contains the event data.

    RemoveControlFromNavigationPanel(Control)

    Removes a Control to the NavigationPanel underneath the NavigationCalendar.

    Declaration
    public void RemoveControlFromNavigationPanel(Control c)
    Parameters
    Type Name Description
    System.Windows.Forms.Control c

    The Control to be removed.

    ResetProvider(ScheduleViewType)

    Resets any actively displayed schedules and re-displays them using the passed in schedule type.

    Declaration
    public void ResetProvider(ScheduleViewType t)
    Parameters
    Type Name Description
    ScheduleViewType t

    The ScheduleViewType that will be used to display the current schedule items.

    Remarks

    Use this method to change the current ScheduleViewType to a new ScheduleViewType.

    SetNavigationPanelPosition(CalendarNavigationPanelPosition)

    Sets the position of the NavigationPanel.

    Declaration
    public void SetNavigationPanelPosition(CalendarNavigationPanelPosition newPosition)
    Parameters
    Type Name Description
    CalendarNavigationPanelPosition newPosition

    Specifies the left or right position of the NavigationPanel, or whether the NavigationPanel is hidden.

    SpanOnlyPrimeTimeChanged()

    Changes the currently loaded span appointments start/end time with respect to SpanOnlyPrimeTime property at runtime.

    Declaration
    public void SpanOnlyPrimeTimeChanged()

    SwitchToScheduleViewTypeDay(DateTime)

    Switches the display to the specified date with ScheduleViewType.Day.

    Declaration
    public void SwitchToScheduleViewTypeDay(DateTime date)
    Parameters
    Type Name Description
    System.DateTime date

    The requested date.

    Events

    AdjustingAppointmentWithMouse

    An event that lets you cancel appointment by appointment whether an appointment can be adjusted using the mouse.

    Declaration
    public event AdjustingAppointmentWithMouseEventHandler AdjustingAppointmentWithMouse
    Event Type
    Type Description
    AdjustingAppointmentWithMouseEventHandler

    AppointmentTimeChanged

    Occurs whenever schedule appointment time is changed.

    Declaration
    public event AppointmentTimeChangedEventHandler AppointmentTimeChanged
    Event Type
    Type Description
    AppointmentTimeChangedEventHandler

    CultureChanged

    Occurs when the culture has been modified.

    Declaration
    public event EventHandler CultureChanged
    Event Type
    Type Description
    System.EventHandler
    Remarks

    You can use this event to move Culture settings into the ScheduleControl's Appearance object to control how the Culture settings affect the look of the ScheduleControl.

    Examples
    void scheduleControl1_CultureChanged(object sender, EventArgs e)
    {
        ScheduleControl sc = sender as ScheduleControl;
        if (sc != null)
        {
            sc.Appearance.WeekHeaderFormat = sc.Culture.DateTimeFormat.MonthDayPattern;
        }
    }

    EnableAlertsChanged

    A notification event that is raised after ShowTime is modified.

    Declaration
    public event EventHandler EnableAlertsChanged
    Event Type
    Type Description
    System.EventHandler

    ItemChanged

    A notification event raised after an IScheduleAppointment is modified.

    Declaration
    public event ScheduleAppointmentChangedEventHandler ItemChanged
    Event Type
    Type Description
    ScheduleAppointmentChangedEventHandler

    ItemChanging

    A cancelable event raised before an IScheduleAppointment is modified.

    Declaration
    public event ScheduleAppointmentChangingEventHandler ItemChanging
    Event Type
    Type Description
    ScheduleAppointmentChangingEventHandler

    ParseDisplayItem

    Occurs when the ScheduleGrid.ParseDisplayItem is called to set the display text for a ScheduleAppointment.

    Declaration
    public event ParseDisplayItemEventHandler ParseDisplayItem
    Event Type
    Type Description
    ParseDisplayItemEventHandler

    ScheduleAppointmentClick

    Occurs when you click or double click an item.

    Declaration
    public event ScheduleAppointmentClickEventHandler ScheduleAppointmentClick
    Event Type
    Type Description
    ScheduleAppointmentClickEventHandler

    ScheduleContextMenuClick

    Occurs when you click or double click an item.

    Declaration
    public event ScheduleContextMenuClickEventHandler ScheduleContextMenuClick
    Event Type
    Type Description
    ScheduleContextMenuClickEventHandler

    ScheduleGridCreated

    An event that lets you either use a derived ScheduleGridControl or to subscribe to events on the ScheduleGridControl.

    Declaration
    public event ScheduleGridCreatedEventHandler ScheduleGridCreated
    Event Type
    Type Description
    ScheduleGridCreatedEventHandler
    Remarks

    As you change ScheduleViewTypes within the ScheduleControl, new ScheduleGridControls are created to reflect the new view type, say switching form a Month view to a Day view. This event is raised after the new ScheduleGrid is created, allowing you to either swap it out for a derived ScheduleGrid, or subscribe to events on the ScheduleGrid.

    To catch the initial creation of a ScheduleGrid with this event, you should make sure you subscribe to the event before you set the ScheduleType property.

    SetupContextMenu

    Subscribe to this event to set up your own Context menu for the ScheduleControl.

    Declaration
    public event CancelEventHandler SetupContextMenu
    Event Type
    Type Description
    System.ComponentModel.CancelEventHandler
    Remarks

    This menu allows you to control the Context menu that is displayed when your user right clicks the DayContainerPanel that hosts the items in the ScheduleControl. Your event handler code should set the Context menu for the ScheduleGrid returned by ScheduleControl.GetScheduleHost. After doing so, your code should set e.Cancel = true. Otherwise, the default implementation of a Windows Forms ContextMenu will override your settings.

    ShowingAppointmentForm

    A cancelable event that occurs before the Appointment form is displayed. You can swap the the displayed form through the events arguments.

    Declaration
    public event ShowingAppointmentFormHandler ShowingAppointmentForm
    Event Type
    Type Description
    ShowingAppointmentFormHandler
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved