- Online Barcode Generator
- How To
- Buy Now
C# Customize Timeline View with KetticScheduler in Windows Forms
KetticScheduler control is capable of Timeline View, which shows the appointments in time slots in horizontal direction. With the Timeline view support, the users are able to customize the time slots according to the duration and change the time scale from minutes to years. Furthermore, the timeline view allows the developers to create, add, and customize the appointments at runtime in C# Windows project, as well as select, resize, drag and drop, navigate with keyboard, and group cells in appointments. When adding the Navigator control to the Scheduler, we can view the preview month and the coming day through the back and forward keyboard arrows.
Timeline View Structure of KetticScheduler
The structure of Timeline View is different from that of Day, MultipleDay, Week and WorkWeek views. The TimeLine view only has a Header and Columns or Scales for the hour, day, week, and month and Appointment Cells. We can choose a predefined value to the scales or select a new scale in the time table for the TimeLine view. Additionally, the Scheduler allows the users to choose their preference from the context menu to set the scales.
C# Set Timeline View in KetticScheduler
To change the default view to be the Timeline view in Scheduler, we shall set the ActiveView type to Timeline. The C# code as below demonstrate the modification
C# Get Timeline View in Scheduler for .NET application
When we customize the Timeline view in KetticScheduler, we shall use the GetTimelineView method to get the instance to the SchedulerTimeling view. The C# code below shows the implementation
An alternative approach is to set the ActiveView property to get the Timeline view in Scheduler for .NET Windows application.
Change Time Range and Set First Date in C#.NET
The SchedulerView C# class contains the StartDateRange and EndDateRange properties for the users to customize the range of Timeline view. After we set the range to the Timeline view, we cannot navigate beyond the range.
In addition, the SchedulerView class provides the StartDate property for the users to set the first date that will be displayed in the timeline view. The first date must be between the dates of StartDateRange and EndDateRange. The C# code below demonstrates how to set these properties.
The following C# code shows how to get the duration between StartDateRange and EndDateRange
Customize Time Scale of Timeline in Scheduler
The Timeline view contains several predefined values, including 15 minutes, Hour, Day, Week, Month, and Year. The users can easily select one of the predefined values or right click in the time table to choose the preferable setting from the context menu to set a new time scale. The following C# code demonstrates how to set the time scale by using the DisplayTimescale method.
UI Controlsfor Windows Forms.NET WinForms UI Overview.NET WinForms UI Features.NET WinForms UI GuideC# WinForms UI DesignVB.NET WinForms UI Design
WinForms UI Controls