This is a migrated thread and some comments may be shown as answers.

Automatically adjust series start to Recurrence start?

3 Answers 56 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Pim Kerkhof
Top achievements
Rank 1
Pim Kerkhof asked on 28 Oct 2014, 03:19 PM
The title may sound a bit strange, so let me elaborate.

In the Silverlight demo of the ScheduleView when I click on monday to make an appointment, then make it a weekly recurrent appointment that reccurs weekly on tuesday and wednesday(but not monday) and every 2 weeks. This seems to work fine and starts recurring the first tuesday and wednesday after the monday I inititally clicked on. When opening the series the ScheduleView seems to have automatically adjusted the start date to the correct day(tuesday, instead of staying on monday).

Now my problem, when I do this same thing in my Silverlight Application the start date does not automatically adjust itself like in the Silverlight demo, resulting in strange behaviour. I can't figure out why though. Could this be a version problem(I'm using version 2014.1.331.1050 of the ScheduleView) or is this a setting I can turn or somewhere? Or does it not actually do it automatically in the demo and do I need to manually calculate the new start date using the Recurrence pattern?

3 Answers, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 29 Oct 2014, 03:52 PM
Hi Pim,

We tried to reproduce the issue based on the provided description using version 2014 Q1 and it seems everything works fine on our side. As an attached file you could find a video that shows our test - please check it and let me know if we had missed anything here. However note that the control should behave that way out of the box, without anything additional.

I am looking forward to hearing from you.

Regards,
Nasko
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Pim Kerkhof
Top achievements
Rank 1
answered on 31 Oct 2014, 07:38 AM
Hello Nasko,

Aside from some minor details that's exactly what I'm doing and expecting. But in my application it does not work.
Of
note is that I've got custom templates for the EditAppointmentDialog
and the EditRecurrenceDialog, one of the things it does is disable the
start, end, duration and no end date fields.
---
        <ControlTemplate x:Key="CustomEditRecurrenceTemplate" TargetType="telerikPresentation:SchedulerDialog">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <telerikPresentation:GroupBox x:Name="RepeatsGroup" Margin="3" telerikPresentation:LocalizationManager.ResourceKey="RecurrencePattern">
                    <telerikPresentation:RadTabControl IsEnabled="{Binding IsReadOnly, Converter={StaticResource InvertedBooleanConverter}}" IsDefaultItemSelected="False" Style="{StaticResource RepeatSelectionTabControlStyle}">
                        <telerikPresentation:RadTabItem x:Name="RepeatDaily" Style="{StaticResource RepeatSelectionTabItemControlStyle}" Header="Daily" IsSelected="{Binding Path=RecurrenceType, Converter={StaticResource EnumToBoolConverter}, ConverterParameter=Daily;WeekDays, Mode=TwoWay}">
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="*" />
                                    <RowDefinition Height="*" />
                                </Grid.RowDefinitions>
                                <StackPanel Grid.Row="0" Orientation="Horizontal">
                                    <RadioButton x:Name="DailyRB" Margin="3" VerticalAlignment="Center" GroupName="DailyGroup" telerikPresentation:LocalizationManager.ResourceKey="Every" IsChecked="{Binding Path=RecurrenceType, Converter={StaticResource EnumToBoolConverter}, ConverterParameter=Daily, Mode=TwoWay}" />
                                    <telerikPresentation:RadNumericUpDown x:Name="DailyDetailsUpDown" Margin="3" VerticalAlignment="Center" MinWidth="70" IsInteger="True" Maximum="999" Value="{Binding Interval, Mode=TwoWay}" />
                                    <TextBlock Margin="3" VerticalAlignment="Center" telerikPresentation:LocalizationManager.ResourceKey="Days" Foreground="{StaticResource RadScheduleForeground}" />
                                </StackPanel>
                                <RadioButton x:Name="WorkdaysRB" Grid.Row="1" Margin="3" VerticalAlignment="Center" GroupName="DailyGroup" telerikPresentation:LocalizationManager.ResourceKey="EveryWeekday" IsChecked="{Binding Path=RecurrenceType, Converter={StaticResource EnumToBoolConverter}, ConverterParameter=WeekDays, Mode=TwoWay}" />
                            </Grid>
                        </telerikPresentation:RadTabItem>
                        <telerikPresentation:RadTabItem x:Name="RepeatWeekly" Style="{StaticResource RepeatSelectionTabItemControlStyle}" Header="Weekly" IsSelected="{Binding Path=RecurrenceType, Converter={StaticResource EnumToBoolConverter}, ConverterParameter=Weekly, Mode=TwoWay}">
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="*" />
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>
                                <StackPanel Grid.Row="0" Orientation="Horizontal">
                                    <telerikPresentation:Label Margin="3" VerticalAlignment="Center" Target="{Binding ElementName=EveryWeekUpDown}" telerikPresentation:LocalizationManager.ResourceKey="RecurEvery" />
                                    <telerikPresentation:RadNumericUpDown x:Name="EveryWeekUpDown" Margin="3" VerticalAlignment="Center" MinWidth="70" IsInteger="True" Maximum="99" Value="{Binding Interval, Mode=TwoWay}" />
                                    <TextBlock Margin="3" VerticalAlignment="Center" telerikPresentation:LocalizationManager.ResourceKey="WeeksOn" Foreground="{StaticResource RadScheduleForeground}" />
                                </StackPanel>
                                <ItemsControl Grid.Row="1" ItemsSource="{Binding WeekDays}" IsTabStop="False">
                                    <ItemsControl.ItemsPanel>
                                        <ItemsPanelTemplate>
                                            <telerikPresentation:RadUniformGrid Rows="2" />
                                        </ItemsPanelTemplate>
                                    </ItemsControl.ItemsPanel>
                                    <ItemsControl.ItemTemplate>
                                        <DataTemplate>
                                            <CheckBox Margin="3 3 12 3" Content="{Binding Name}" IsChecked="{Binding  IsSelected, Mode=TwoWay}" />
                                        </DataTemplate>
                                    </ItemsControl.ItemTemplate>
                                </ItemsControl>
                            </Grid>
                        </telerikPresentation:RadTabItem>
                        <telerikPresentation:RadTabItem x:Name="RepeatMonthly" Style="{StaticResource RepeatSelectionTabItemControlStyle}" Header="Monthly" IsSelected="{Binding Path=RecurrenceType, Converter={StaticResource EnumToBoolConverter}, ConverterParameter=Monthly;MonthlyNth, Mode=TwoWay}">
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="*" />
                                    <RowDefinition Height="*" />
                                </Grid.RowDefinitions>
                                <StackPanel Grid.Row="0" Orientation="Horizontal">
                                    <RadioButton x:Name="MonthlyRB" Margin="3" VerticalAlignment="Center" GroupName="MonthlyButtons" telerikPresentation:LocalizationManager.ResourceKey="Day" IsChecked="{Binding RecurrenceType, Converter={StaticResource EnumToBoolConverter}, ConverterParameter=Monthly, Mode=TwoWay}" />
                                    <telerikPresentation:RadNumericUpDown x:Name="MonthlyDetailsUpDown1" Margin="3" VerticalAlignment="Center" MinWidth="70" IsInteger="True" Maximum="31" Value="{Binding DayOfMonth, Mode=TwoWay}" />
                                    <TextBlock Margin="3" VerticalAlignment="Center" telerikPresentation:LocalizationManager.ResourceKey="OfEvery" Foreground="{StaticResource RadScheduleForeground}" />
                                    <telerikPresentation:RadNumericUpDown Name="MonthlyDetailsUpDown2" Margin="3" VerticalAlignment="Center" MinWidth="70" IsInteger="True" Maximum="99" Value="{Binding Interval, Mode=TwoWay}" />
                                    <TextBlock Margin="3" VerticalAlignment="Center" telerikPresentation:LocalizationManager.ResourceKey="Months" Foreground="{StaticResource RadScheduleForeground}" />
                                </StackPanel>
                                <StackPanel Grid.Row="1" Orientation="Horizontal">
                                    <RadioButton x:Name="MonthlyNthRB" Margin="3" VerticalAlignment="Center" GroupName="MonthlyButtons" telerikPresentation:LocalizationManager.ResourceKey="The" IsChecked="{Binding RecurrenceType, Converter={StaticResource EnumToBoolConverter}, ConverterParameter=MonthlyNth, Mode=TwoWay}" />
                                    <telerikPresentation:RadComboBox Margin="3" VerticalAlignment="Center" Width="70" ItemsSource="{Binding WeekOfMonths}" DisplayMemberPath="Name" SelectedValuePath="Value" SelectedValue="{Binding WeekOfMonth, Mode=TwoWay}" />
                                    <telerikPresentation:RadComboBox Margin="3" VerticalAlignment="Center" Width="100" ItemsSource="{Binding NthRecurrenceDays}" DisplayMemberPath="Name" SelectedValuePath="Value" SelectedValue="{Binding NthRecurrenceDay, Mode=TwoWay}" />
                                    <TextBlock Margin="3" VerticalAlignment="Center" telerikPresentation:LocalizationManager.ResourceKey="OfEvery" Foreground="{StaticResource RadScheduleForeground}" />
                                    <telerikPresentation:RadNumericUpDown Name="MonthlyDetailsUpDown3" Margin="3" VerticalAlignment="Center" MinWidth="70" IsInteger="True" Maximum="99" Value="{Binding Interval, Mode=TwoWay}" />
                                    <TextBlock Margin="3" VerticalAlignment="Center" telerikPresentation:LocalizationManager.ResourceKey="Months" Foreground="{StaticResource RadScheduleForeground}" />
                                </StackPanel>
                            </Grid>
                        </telerikPresentation:RadTabItem>
                        <telerikPresentation:RadTabItem x:Name="RepeatYearly" Style="{StaticResource RepeatSelectionTabItemControlStyle}" Header="Yearly" IsSelected="{Binding Path=RecurrenceType, Converter={StaticResource EnumToBoolConverter}, ConverterParameter=Yearly;YearlyNth, Mode=TwoWay}">
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="50*" />
                                    <RowDefinition Height="50*" />
                                </Grid.RowDefinitions>
                                <StackPanel Grid.Row="0" Orientation="Horizontal">
                                    <RadioButton x:Name="YearlyRB" GroupName="YearlyGroup" Margin="3" VerticalAlignment="Center" telerikPresentation:LocalizationManager.ResourceKey="Every" IsChecked="{Binding RecurrenceType, Converter={StaticResource EnumToBoolConverter}, ConverterParameter=Yearly, Mode=TwoWay}" />
                                    <telerikPresentation:RadComboBox x:Name="YearlyDetails12" Margin="3" VerticalAlignment="Center" Width="100" ItemsSource="{Binding NamesOfMonths}" DisplayMemberPath="Value" SelectedValuePath="Key" SelectedValue="{Binding MonthOfYear, Mode=TwoWay}" />
                                    <telerikPresentation:RadNumericUpDown x:Name="YearlyDetailsUpDown3" Margin="3" VerticalAlignment="Center" Width="70" IsInteger="True" Maximum="31" Value="{Binding DayOfMonth, Mode=TwoWay}" />
                                </StackPanel>
                                <StackPanel Grid.Row="1" Orientation="Horizontal">
                                    <RadioButton x:Name="YearlyNthRB" GroupName="YearlyGroup" Margin="3" VerticalAlignment="Center" telerikPresentation:LocalizationManager.ResourceKey="The" IsChecked="{Binding RecurrenceType, Converter={StaticResource EnumToBoolConverter}, ConverterParameter=YearlyNth, Mode=TwoWay}" />
                                    <telerikPresentation:RadComboBox x:Name="YearlyDetails21" Margin="3" VerticalAlignment="Center" Width="80" ItemsSource="{Binding WeekOfMonths}" DisplayMemberPath="Name" SelectedValuePath="Value" SelectedValue="{Binding WeekOfMonth, Mode=TwoWay}" />
                                    <telerikPresentation:RadComboBox x:Name="YearlyDetails22" Margin="3" VerticalAlignment="Center" Width="100" ItemsSource="{Binding NthRecurrenceDays}" DisplayMemberPath="Name" SelectedValuePath="Value" SelectedValue="{Binding NthRecurrenceDay, Mode=TwoWay}" />
                                    <TextBlock Margin="3" VerticalAlignment="Center" telerikPresentation:LocalizationManager.ResourceKey="Of" Foreground="{StaticResource RadScheduleForeground}" />
                                    <telerikPresentation:RadComboBox x:Name="YearlyDetails23" Margin="3" VerticalAlignment="Center" Width="100" ItemsSource="{Binding NamesOfMonths}" DisplayMemberPath="Value" SelectedValuePath="Key" SelectedValue="{Binding MonthOfYear, Mode=TwoWay}" />
                                </StackPanel>
                            </Grid>
                        </telerikPresentation:RadTabItem>
                    </telerikPresentation:RadTabControl>
                </telerikPresentation:GroupBox>
                <telerikPresentation:GroupBox x:Name="RangeGroup" Margin="3" Grid.Row="1" telerikPresentation:LocalizationManager.ResourceKey="RangeOfRecurrence">
                    <telerikPresentation:RadUniformGrid Columns="1">
                        <StackPanel Orientation="Horizontal">
                            <RadioButton x:Name="EndAfter" Margin="3" MinWidth="100" VerticalAlignment="Center" IsEnabled="{Binding IsReadOnly, Converter={StaticResource InvertedBooleanConverter}}" telerikPresentation:LocalizationManager.ResourceKey="EndAfter" IsChecked="{Binding Path=RecurrenceRangeType, Converter={StaticResource EnumToBoolConverter}, ConverterParameter=MaxOccurrences, Mode=TwoWay}" />
                            <telerikPresentation:RadNumericUpDown x:Name="OccurencesUpDown" Margin="3" VerticalAlignment="Center" IsEnabled="{Binding IsChecked, ElementName=EndAfter}" IsInteger="True" MinWidth="70" Value="{Binding MaxOccurrences, Mode=TwoWay}" ValueChanged="OccurencesUpDown_ValueChanged" />
                            <TextBlock Margin="3" VerticalAlignment="Center" telerikPresentation:LocalizationManager.ResourceKey="Occurrences" Foreground="{StaticResource RadScheduleForeground}" />
                        </StackPanel>
                        <StackPanel Orientation="Horizontal">
                            <RadioButton x:Name="EndBy" Margin="3" MinWidth="70" VerticalAlignment="Center" IsEnabled="{Binding IsReadOnly, Converter={StaticResource InvertedBooleanConverter}}" telerikPresentation:LocalizationManager.ResourceKey="EndBy" IsChecked="{Binding Path=RecurrenceRangeType, Converter={StaticResource EnumToBoolConverter}, ConverterParameter=RepeatUntil, Mode=TwoWay}" />
                            <telerikPresentation:RadDatePicker x:Name="rdpRecursUntil" Loaded="rdpRecursUntil_Loaded" Margin="3" VerticalAlignment="Center" Width="120" IsReadOnly="{Binding IsReadOnly}" IsEnabled="{Binding IsChecked, ElementName=EndBy}" SelectedValue="{Binding RecursUntil, Mode=TwoWay}" Culture="{Binding DefaultCulture,Source={StaticResource LocalizationManager}}" SelectionChanged="rdpRecursUntil_SelectionChanged"  />
                        </StackPanel>
                    </telerikPresentation:RadUniformGrid>
                </telerikPresentation:GroupBox>
                <StackPanel x:Name="WindowButtons" Grid.Row="2" Margin="13 6" HorizontalAlignment="Right" VerticalAlignment="Bottom" Orientation="Horizontal">
                    <telerikPresentation:RadButton x:Name="RemoveRecurrenceBtn" Margin="2" MinWidth="84" telerikPresentation:LocalizationManager.ResourceKey="RemoveRecurrence" Command="local:RadScheduleViewCommands.DeleteRecurrenceRule" Visibility="{Binding IsEnabled, RelativeSource={RelativeSource Self}, Converter={StaticResource BooleanToVisibilityConverter}, Mode=TwoWay}" />
                    <telerikPresentation:RadButton x:Name="OKButton" Margin="2" MinWidth="84" telerikPresentation:LocalizationManager.ResourceKey="Ok" Command="telerikPresentation:WindowCommands.Confirm" telerikPresentation:RadWindow.ResponseButton="Accept" />
                    <telerikPresentation:RadButton x:Name="CancelButton" Margin="2" MinWidth="84" telerikPresentation:LocalizationManager.ResourceKey="Cancel" Command="telerikPresentation:WindowCommands.Cancel" telerikPresentation:RadWindow.ResponseButton="Cancel" />
                </StackPanel>
            </Grid>
        </ControlTemplate>
---

The other part that could be important is this part from the EditAppointmentTemplate:
---
                    <TextBlock Grid.Row="2" Grid.Column="0" Margin="6" Text="Datum" HorizontalAlignment="Right" />
                    <telerikPresentation:RadDateTimePicker InputMode="DatePicker" Grid.Row="2" Grid.Column="1" Margin="3" IsReadOnly="{Binding IsReadOnly}" Culture="{Binding DefaultCulture,Source={StaticResource LocalizationManager}}" SelectedValue="{Binding ActualStart, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}"/>

                    <TextBlock Grid.Row="3" Grid.Column="0" Margin="6" VerticalAlignment="Center" HorizontalAlignment="Right" Text="Starttijd" telerik:StyleManager.Theme="{StaticResource Theme}" />
                    <StackPanel Grid.Row="3" Grid.Column="1" Grid.ColumnSpan="2" Orientation="Horizontal">
                        <telerikPresentation:RadDateTimePicker InputMode="TimePicker" Width="75" Loaded="rdtpStartDate_Loaded" Margin="3" IsReadOnly="{Binding IsReadOnly}" Culture="{Binding DefaultCulture,Source={StaticResource LocalizationManager}}" SelectedValue="{Binding ActualStart, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}" />

                        <TextBlock Margin="6" VerticalAlignment="Center" Text="Eindtijd" telerik:StyleManager.Theme="{StaticResource Theme}" />
                        <telerikPresentation:RadDateTimePicker InputMode="TimePicker" Width="75" Loaded="rdtpEndDate_Loaded" Margin="3" IsReadOnly="{Binding IsReadOnly}" Culture="{Binding DefaultCulture,Source={StaticResource LocalizationManager}}" SelectedValue="{Binding ActualEnd, Mode=TwoWay}" telerik:StyleManager.Theme="{StaticResource Theme}" />
                    </StackPanel>
---

Are the binding corrects, or should I be binding to for example Occurrence.Appointment.Start (if possible)?
0
Nasko
Telerik team
answered on 31 Oct 2014, 02:51 PM
Hi Pim,

We have tried to reproduce your issue using the provided code snipped for the EditRecurrenceDialog but everything seems to work as expected. So, could you please modify the sample project I am sending you in order to reproduce it, so we'll be able to investigate it further. We also recommend when you need to change some the default ScheduleView dialogs to use its default template and modify it as needed - not to create it from scratch.

I am looking forward to hearing from you.

Regards,
Nasko
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
ScheduleView
Asked by
Pim Kerkhof
Top achievements
Rank 1
Answers by
Nasko
Telerik team
Pim Kerkhof
Top achievements
Rank 1
Share this question
or