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

Problem in "adjusting" appointment's times

2 Answers 103 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Cheau-Long
Top achievements
Rank 1
Cheau-Long asked on 20 Jun 2011, 06:15 PM
Hi Telerik,

I'm experiencing a strange behavior of the ScheduleView. I set schedule to view by day and had one hour increment as shown below. The ScheduleView had SnapAppointments="True". The problem is I couldn't adjust down to one hour slot, but I could change it through appointment edit dialog. For example, I couldn't slide end time from 3AM to 2AM where start time is 1AM. Any ideas what went wrong? Thanks.





        <!-- ScheduleView -->
        <telerik:RadScheduleView x:Name="scheduleView"
                                Grid.Row="2"                                 
                                MaxTimeRulerExtent="500" 
                                AppointmentsSource="{Binding Tasks, Mode=TwoWay}"
                                ResourceTypesSource="{Binding ScheduleOptionList, Mode=TwoWay}"
                                GroupDescriptionsSource="{Binding GroupCollection, Mode=TwoWay}"
                                CurrentDate="{Binding DefaultDate}"								
                                NavigationHeaderVisibility="Collapsed"
                                AllowDrop="True"
                                SnapAppointments="True"   
                                Height="Auto">
 
            <telerik:RadScheduleView.DragDropBehavior>
                <local:ScheduleDragDropBehavior/>
            </telerik:RadScheduleView.DragDropBehavior>
 
            <telerik:RadScheduleView.AppointmentItemContentTemplate>
                <DataTemplate>
                    <StackPanel>
                        <TextBlock Text="{Binding Subject}"  FontWeight="Bold"/>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Text="{Binding Start, StringFormat={}{0:hh:mm tt}}"/>
                            <TextBlock Text=" - "/>
                            <TextBlock Text="{Binding End, StringFormat={}{0:hh:mm tt}}"/>
                        </StackPanel>
                    </StackPanel>
                </DataTemplate>
            </telerik:RadScheduleView.AppointmentItemContentTemplate>
 
            <telerik:RadScheduleView.ActiveViewDefinition>
                <telerik:DayViewDefinition Orientation="Horizontal" FirstDayOfWeek="Monday" TimerulerMajorTickStringFormat="{}{0:htt}" 
                                            MinorTickLength="1h"  MajorTickLength="1h" MinTimeRulerExtent="700" />
            </telerik:RadScheduleView.ActiveViewDefinition>
 
            <telerik:RadScheduleView.GroupHeaderContentTemplateSelector>
                <telerik:OrientedGroupHeaderContentTemplateSelector>
                    <telerik:OrientedGroupHeaderContentTemplateSelector.VerticalDayViewDateTemplate>
                        <DataTemplate>
                            <Grid Visibility="Hidden"/>
                        </DataTemplate>
                    </telerik:OrientedGroupHeaderContentTemplateSelector.VerticalDayViewDateTemplate>
                    <telerik:OrientedGroupHeaderContentTemplateSelector.VerticalResourceTemplate>
                        <DataTemplate>
                            <TextBlock Width="60" Margin="5,0" Text="{Binding FormattedName}" 
                                       HorizontalAlignment="Center" VerticalAlignment="Center" />
                        </DataTemplate>
                    </telerik:OrientedGroupHeaderContentTemplateSelector.VerticalResourceTemplate>
                </telerik:OrientedGroupHeaderContentTemplateSelector>
            </telerik:RadScheduleView.GroupHeaderContentTemplateSelector>
 
        </telerik:RadScheduleView>

2 Answers, 1 is accepted

Sort by
0
Rosi
Telerik team
answered on 21 Jun 2011, 08:08 AM
Hello Cheau,

I suggest you change the value of the MinAppointmentWidth .For example :MinAppointmentWidth="22".

The default value is 50 and this value is considered during snapping. We will improve this behavior for the next version.


Regards,
Rosi
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Cheau-Long
Top achievements
Rank 1
answered on 21 Jun 2011, 04:25 PM
Thanks Rosi! This indeed has fixed the problem.
Tags
ScheduleView
Asked by
Cheau-Long
Top achievements
Rank 1
Answers by
Rosi
Telerik team
Cheau-Long
Top achievements
Rank 1
Share this question
or