Implement a Gantt view in Scheduler We choose another approach for this and we implemented a whole new RadGanttView control instead. Of course it can be paired up with RadScheduler. Here is the product page: http://www.telerik.com/products/winforms/ganttview-beta.aspx
Printing support
Add the possibility to have multiple time intervals for a working range and to have separate working ranges for different resources.
Currently, it is not possible to set for example 9:30 as a start scale for the ruler in DayView and WeekView.
Add the possibility either for the end user or the developer to modify the width or height (whichever is relevant) of the resource areas in different views.
Add the possibility to specify given date as a holiday.
Add vertical scroll bar to the month cell
IMPROVE. RadScheduler - add event that notifies when an appointment is added by the user. The event args should provide information whether the event is added via the edit appointment dialog or via the inline functionality
Please use the Demo application >> Scheduler example and follow the steps in the attached gif file.
Expected result: the deleted appointment should disappear from the grid after closing the edit dialog.
Actual result: the deleted appointment is still visible in the agenda grid after closing the edit dialog.
Note: pressing the Delete key when an appointment is selected in agenda view doesn't perform any delete operation. In the rest of the scheduler view, the selected appointment is deleted.
Workaround: after an appointment is deleted, refresh the agenda grid by changing the view:
Private Sub RadScheduler1_AppointmentDeleted(sender As Object, e As SchedulerAppointmentEventArgs)
Me.RadScheduler1.ActiveViewType = SchedulerViewType.Day
Me.RadScheduler1.ActiveViewType = SchedulerViewType.Agenda
End Sub
Please refer to the attached screenshots. A sample project is attached. There is a known issue in the .NET Framework considering the "fa-IR" culture. Please refer to the following MSDN resource for a solution which is included in the sample project: https://code.msdn.microsoft.com/Fixing-Persian-Locale-for-6e66e044#content Workaround: private void radScheduler1_CellFormatting(object sender, SchedulerCellEventArgs e) { MonthCellElement monthCellElement = e.CellElement as MonthCellElement; if (monthCellElement != null) { monthCellElement.Header.Text = monthCellElement.Date.ToString("dd", this.radScheduler1.Culture); } }
1. Add RadSchedulerNavigator and a RadScheduler. Change the view type to Week View. 2. Associate the RadSchedulerNavigator to RadScheduler. Change the PC's time zone to (UTC-03:00) Brasilia Time zone 3. Change the PC's date to 21 Oct 2016 and run the application. 4. When you change the time zone in RadSchedulerNavigator to (UTC-03:00) Brasilia Time zone, you will notice that the ruler starts from 23. Workaround: public Form1() { InitializeComponent(); radSchedulerNavigator1.AssociatedScheduler = radScheduler1; this.radScheduler1.ActiveViewChanged += radScheduler1_ActiveViewChanged; this.radScheduler1.CellElementMouseDown += radScheduler1_CellElementMouseDown; this.radScheduler1.AppointmentEditDialogShowing += radScheduler1_AppointmentEditDialogShowing; radScheduler1.ActiveViewType = Telerik.WinControls.UI.SchedulerViewType.Week; } DateTime? date = null; private void radScheduler1_CellElementMouseDown(object sender, MouseEventArgs e) { SchedulerCellElement cell = this.radScheduler1.ElementTree.GetElementAtPoint(e.Location) as SchedulerCellElement; if (cell != null) { date = cell.Date; } } CustomEditAppointmentDialog dialog = null; private void radScheduler1_AppointmentEditDialogShowing(object sender, AppointmentEditDialogShowingEventArgs e) { if (dialog == null) { dialog = new CustomEditAppointmentDialog(); } e.AppointmentEditDialog = dialog; if (date != null && !e.Appointment.Start.Equals(date)) { e.Appointment.Start = (DateTime)date; } date = null; } private void radScheduler1_ActiveViewChanged(object sender, Telerik.WinControls.UI.SchedulerViewChangedEventArgs e) { SchedulerDayView dayView = e.NewView as SchedulerDayView; SchedulerWeekView weekView = e.NewView as SchedulerWeekView; if (dayView != null || weekView != null) { RulerPrimitive ruler = (this.radScheduler1.SchedulerElement.ViewElement as SchedulerDayViewElement).DataAreaElement.Ruler; ruler.GetType().GetField("defaultOffset", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).SetValue(ruler, 0.0f); } } public class CustomEditAppointmentDialog : EditAppointmentDialog { protected override void LoadSettingsFromEvent(IEvent sourceEvent) { base.LoadSettingsFromEvent(sourceEvent); this.dateStart.Value = sourceEvent.Start; this.timeStart.Value = sourceEvent.Start; } }
The appointments area of RadScheduler in DayView or WeekView should be automatically scrolled when resizing appointments.
The local time is EEST — Eastern European Summer Time (Current Offset: UTC/GMT +3 hours). Add an additional time zone IST — India Standard Time (Current Offset: UTC/GMT +5:30 hours). It is expected to show 2 hours and 30 minutes difference between the two times zones. However, it is 1 hour and 30 minutes:
Public Sub New()
InitializeComponent()
allTimeZones = SchedulerTimeZone.GetSchedulerTimeZones()
Dim mumbai As SchedulerTimeZone = GetSpecificTimeZone("India Standard Time")
If Not mumbai.Equals(Me.RadScheduler1.GetDayView().DefaultTimeZone) Then
RadScheduler1.GetDayView().TimeZones.Insert(0, mumbai)
End If
Dim utc As SchedulerTimeZone = GetSpecificTimeZone("UTC")
If Not utc.Equals(Me.RadScheduler1.GetDayView().DefaultTimeZone) Then
RadScheduler1.GetDayView().TimeZones.Insert(0, utc)
End If
End Sub
Private Function GetSpecificTimeZone(_TimeZoneInformationID As String) As SchedulerTimeZone
Try
Dim tempZone As New SchedulerTimeZone((From t In allTimeZones.Where(Function(x) x.TimeZoneInformation.Id Like _TimeZoneInformationID) Select t.TimeZoneInformation).First)
tempZone.Label = tempZone.TimeZoneInformation.BaseUtcOffset.ToString()
Return tempZone
Catch ex As Exception
Return Nothing
End Try
End Function
Actual: 1 hour behind the expected
Expected:
Workaround:
Public Class Form1
Private allTimeZones As List(Of SchedulerTimeZone)
Public Sub New()
InitializeComponent()
Me.RadScheduler1.ElementProvider = New CustomSchedulerElementProvider(Me.RadScheduler1)
allTimeZones = SchedulerTimeZone.GetSchedulerTimeZones()
Dim mumbai As SchedulerTimeZone = GetSpecificTimeZone("India Standard Time")
If Not mumbai.Equals(Me.RadScheduler1.GetDayView().DefaultTimeZone) Then
RadScheduler1.GetDayView().TimeZones.Insert(0, mumbai)
End If
Dim utc As SchedulerTimeZone = GetSpecificTimeZone("UTC")
If Not utc.Equals(Me.RadScheduler1.GetDayView().DefaultTimeZone) Then
RadScheduler1.GetDayView().TimeZones.Insert(0, utc)
End If
End Sub
Private Function GetSpecificTimeZone(_TimeZoneInformationID As String) As SchedulerTimeZone
Try
Dim tempZone As New SchedulerTimeZone((From t In allTimeZones.Where(Function(x) x.TimeZoneInformation.Id Like _TimeZoneInformationID) Select t.TimeZoneInformation).First)
tempZone.Label = tempZone.TimeZoneInformation.BaseUtcOffset.ToString()
Return tempZone
Catch ex As Exception
Return Nothing
End Try
End Function
End Class
Public Class CustomSchedulerElementProvider
Inherits SchedulerElementProvider
Public Sub New(scheduler As RadScheduler)
MyBase.New(scheduler)
End Sub
Public Overrides Function CreateRulerPrimitive(area As DayViewAppointmentsArea, timeZone As SchedulerTimeZone) As RulerPrimitive
Dim ruler As RulerPrimitive = MyBase.CreateRulerPrimitive(area, timeZone)
ruler.RulerRenderer = New CustomRulerRenderer(ruler)
Return ruler
End Function
End Class
Public Class CustomRulerRenderer
Inherits RulerRenderer
Public Sub New(ruler As RulerPrimitive)
MyBase.New(ruler)
End Sub
Public Overrides Sub RenderHour(g As IGraphics, hour As Integer, bounds As RectangleF)
hour += Me.ruler.StartScale + CInt(Math.Ceiling(Me.ruler.DefaultOffset))
Dim currentTime As DateTime = DateTime.Now.Date.AddHours(hour)
Dim percent As Single = Me.ruler.DefaultOffset - CSng(Math.Floor(CDbl(Me.ruler.DefaultOffset)))
Dim x As Integer = Me.ruler.HourLineStartPosition
Dim y As Single = CSng(Math.Ceiling(bounds.Top + (GetSpecificRange() * bounds.Height) * percent))
Dim hourText As String = ""
If Me.ruler.FormatStrings.HoursFormatString IsNot Nothing Then
hourText = currentTime.ToString(Me.ruler.FormatStrings.HoursFormatString)
End If
'Dim args As RulerTextFormattingEventArgs = New RulerTextFormattingEventArgs(hourText, RulerTextFormattingContext.Hour, currentTime)
'Me.ruler.Scheduler.OnRulerTextFormatting(args)
'hourText = args.Text
Dim minutesText As String = ""
If Me.ruler.FormatStrings.MinutesFormatString IsNot Nothing Then
minutesText = currentTime.ToString(Me.ruler.FormatStrings.MinutesFormatString)
End If
'args = New RulerTextFormattingEventArgs(minutesText, RulerTextFormattingContext.Minute, currentTime)
'Me.ruler.scheduler.OnRulerTextFormatting(args)
'minutesText = args.Text
Dim measuredSize As Size = TextRenderer.MeasureText(hourText, Me.ruler.Font)
measuredSize = DrawTimeText(g, y, hourText, minutesText, measuredSize)
If ruler.RightToLeft Then
g.DrawLine(Me.ruler.HourLineColor, Me.ruler.Bounds.Left, y, Me.ruler.Bounds.Width - x, y, Me.ruler.DpiScaleFactor.Height)
g.DrawLine(Me.ruler.HourLineShadowColor, Me.ruler.Bounds.Left, y + Me.ruler.DpiScaleFactor.Height, Me.ruler.Bounds.Width - x, y + Me.ruler.DpiScaleFactor.Height, Me.ruler.DpiScaleFactor.Height)
Else
g.DrawLine(Me.ruler.HourLineColor, x, y, Me.ruler.Bounds.Width, y, Me.ruler.DpiScaleFactor.Height)
g.DrawLine(Me.ruler.HourLineShadowColor, x, y + Me.ruler.DpiScaleFactor.Height, Me.ruler.Bounds.Width, y + Me.ruler.DpiScaleFactor.Height, Me.ruler.DpiScaleFactor.Height)
End If
End Sub
Friend Function GetSpecificRange() As Integer
Return 60 / CInt(Me.ruler.RangeFactor)
End Function
End Class
Additional borders appear in AgendaView when the Date column is sorted. This behavior is observed in the following themes:
Implement search function in RadSchedulerNavigator.
this.radScheduler1.Appointments.EndUpdate(); Does not refresh the Scheduler view element.
Add the possibility to enable rendering appointments not in the whole cell when their duration is less than the range factor of the view.
The occurrences and the navigation arrows are not displayed correctly when using YearlyRecurrence with the "First Monday of January" rule. The issue also appears with similar rule types.
1. Create a new project with RadScheduler. 2. Handle the AppointmentFormatting event and change appointment border color. 3. Run the project and add an appointment.
When you subscribe to the AppointmentMoved or AppointmentDropped event of RadScheduler, the DataItem property of the appointment in the event args is always null.