When the IsGroupHeadersVirtualizationEnabled property is set to True, changing the VisibleDays of the active view definition from a higher value to a smaller one causes appointments to not be displayed.
To work this around, call the Measure method of RadScheduleView when the VisibleDays property changes:
public class RadScheduleViewExtensions
{
public static int GetVisibleDays(DependencyObject obj)
{
return (int)obj.GetValue(VisibleDaysProperty);
}
public static void SetVisibleDays(DependencyObject obj, int value)
{
obj.SetValue(VisibleDaysProperty, value);
}
public static readonly DependencyProperty VisibleDaysProperty =
DependencyProperty.RegisterAttached("VisibleDays", typeof(int), typeof(RadScheduleViewExtensions), new PropertyMetadata(0, OnVisibleDaysChanged));
private static void OnVisibleDaysChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
RadScheduleView scheduleView = (RadScheduleView)d;
if (scheduleView.IsLoaded)
{
scheduleView.Measure(Size.Empty);
Dispatcher.CurrentDispatcher.BeginInvoke(new Action(() =>
{
Size renderSize = scheduleView.RenderSize;
scheduleView.Measure(renderSize);
}), (DispatcherPriority)3);
}
}
}
<telerik:RadScheduleView x:Name="scheduleView"
AppointmentsSource="{Binding Appointments}"
local:RadScheduleViewExtensions.VisibleDays="{Binding MyPropertyForVisibleDays}"
IsGroupHeadersVirtualizationEnabled="True">
<telerik:RadScheduleView.ViewDefinitions>
<telerik:DayViewDefinition VisibleDays="{Binding MyPropertyForVisibleDays, Mode=TwoWay}" />
</telerik:RadScheduleView.ViewDefinitions>
</telerik:RadScheduleView>
The GetOccurrencesWithoutExceptionsFromDateTimeRange should return the occurrences of a recurring appointment, without the exceptions (modified or deleted occurrences). However, now the method returns modified occurrences and skips only the deleted ones. The method should skip also the modified occurrences.
To work this around, exclude the exceptions using their state property:
var occurrencesWithoutExceptions = appointment.GetOccurrencesWithoutExceptionsFromDateTimeRange(appointment.Start, DateTime.Now.AddDays(130)).Where(o => o.State != RecurrenceState.Exception);
public class CustomScheduleView : RadScheduleView
{
protected override void OnActiveViewDefinitionChanged(ViewDefinitionBase oldValue, ViewDefinitionBase newValue)
{
base.OnActiveViewDefinitionChanged(oldValue, newValue);
}
}
I need an overview of the appointments in the range of multiple days of several resources (let's say, employees).
For this, the agenda view would be perfect if it shows the days as rows but the grouped resources as columns.
In the current version it as possible to group by resources in the agenda view, but the single resources can be displayed only as rows along with the days. This way an overview is not possible. At now, I have to put several ScheduleView controls side by side, each displaying a single resource, to achieve the desired view.
Therefore I want to engage a feature request:
Please, in the agenda view, allow a grouping of resources with arranging them in a horizontal way, while the days stay arranged in a vertical manner.