menu

WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class ScheduleGridCreatedEventArgs - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class ScheduleGridCreatedEventArgs

    Provides data for the ScheduleGridCreated event.

    Inheritance
    System.Object
    System.EventArgs
    ScheduleGridCreatedEventArgs
    Inherited Members
    System.EventArgs.Empty
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Syncfusion.Windows.Forms.Schedule
    Assembly: Syncfusion.Schedule.Windows.dll
    Syntax
    public class ScheduleGridCreatedEventArgs : EventArgs
    Remarks

    An event that lets you replace the default ScheduleGrid with a derived grid, or subscribe to events on the ScheduleGrid. If you need to use a derived ScheduleGrid for any reason, set Grid to be an instance of your derived ScheduleGrid and set Handled = true. If you want to subscribe to events on a ScheduleGrid, create an instance of ScheduleGrid, subscribe to the events, set Grid to the instance, and set Handled = true. Here is a sample event handler that subscribes to the CurrentCellKeyDown on the ScheduleGrid.

           void scheduleControl1_ScheduleGridCreated(object sender, ScheduleGridCreatedEventArgs e)
       {
           //subscribe to an event
           ScheduleGrid grid = new ScheduleGrid(e.Calendar, e.Schedule, e.InitialDate);
           grid.CurrentCellKeyDown += new KeyEventHandler(grid_CurrentCellKeyDown);
           e.Grid = grid;
           e.Handled = true;
       }

    Here is a sample event handler that creates an instance of a derived ScheduleGrid.

           void scheduleControl1_ScheduleGridCreated(object sender, ScheduleGridCreatedEventArgs e)
       {
           //create a derived ScheduleGrid
           e.Grid = new MyScheduleGrid(e.Calendar, e.Schedule, e.InitialDate);
           e.Handled = true;
       }

    Constructors

    ScheduleGridCreatedEventArgs(NavigationCalendar, ScheduleControl, DateTime)

    Initializes a new instance of the ScheduleGridCreatedEventArgs class.

    Declaration
    public ScheduleGridCreatedEventArgs(NavigationCalendar calendar, ScheduleControl schedule, DateTime initialDate)
    Parameters
    Type Name Description
    NavigationCalendar calendar

    The navigation calendar used to create the ScheduleGrid.

    ScheduleControl schedule

    The ScheduleControl that is the parent of the ScheduleGrid being created.

    System.DateTime initialDate

    The date used to create the ScheduleGrid.

    Properties

    Calendar

    Gets the navigation calendar used by the ScheduleGrid being created.

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

    Grid

    Gets or sets the ScheduleGrid being used by the ScheduleControl.

    Declaration
    public ScheduleGrid Grid { get; set; }
    Property Value
    Type
    ScheduleGrid
    Remarks

    Make sure you set Handled = true if you supply a ScheduleGrid object by setting this member.

    Handled

    Gets or sets a value indicating whether a ScheduleGrid is being returned in GridControl.

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

    Use this variable to indicate that your event handler has created a ScheduleGrid object and assigned it to Grid so it can be used in your ScheduleControl. This allows you to use derived ScheduleGrid objects, and also create a schedule grid object and subscribe to events on it.

    InitialDate

    Gets the date used to create the ScheduleGrid.

    Declaration
    public DateTime InitialDate { get; }
    Property Value
    Type
    System.DateTime

    Schedule

    Gets the ScheduleControl being used by the ScheduleGrid being created.

    Declaration
    public ScheduleControl Schedule { get; }
    Property Value
    Type
    ScheduleControl
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved