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

Slot selection runtime error

1 Answer 40 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 18 Oct 2011, 05:02 AM
I am getting the following error when a user maked a new appointment and then clicks on a new slot very quickly just after the initial appointment window has closed.  This only occurs if there are allot af appointments 100+ being displayed on the screen and you are very fast in selecting a new slot.  This can be reproduced

Object reference not set to an instance of an object.
   at Telerik.Windows.Controls.ScheduleView.DateSpan..ctor(IDateSpan other)
   at Telerik.Windows.Controls.ScheduleView.SlotSelectionBehavior.GetContiguousSelectionSlot(IDateSpan anchorRange, IDateSpan currentSlot)
   at Telerik.Windows.Controls.ScheduleView.SlotSelectionBehavior.GetSelection(SlotSelectionState state, Slot currentSlot)
   at Telerik.Windows.Controls.ScheduleViewBase.SelectArea(Point clickedPoint)
   at Telerik.Windows.Controls.ScheduleViewBase.OnSlotDragDelta(Point mousePosition)
   at Telerik.Windows.Controls.ScheduleView.DragElementHelper.OnElementMouseMove(Object sender, MouseEventArgs e)
   at MS.Internal.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
   at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName)

This is my RadScheduleView XML

<telerik:RadScheduleView x:Name="RadScheduleView" ToolTipTemplate="{StaticResource AppointmentToolTipTemplate}"  

 

AppointmentsSource="{Binding Source={StaticResource ViewModel}, Path=Appointments,Mode=TwoWay}"

SelectedAppointment="{Binding Source={StaticResource ViewModel}, Path=SelectedAppointment,Mode=TwoWay}"

ResourceTypesSource="{Binding Source={StaticResource ViewModel}, Path=ResourceTypes}"

GroupHeaderContentTemplateSelector="{StaticResource GroupHeaderContentTemplateSelector}"

AppointmentCreating="RadScheduleView_AppointmentCreating"

AppointmentEditing="RadScheduleView_AppointmentEditing" ShowDialog="RadScheduleView_ShowDialog"

HorizontalContentAlignment="Left" VerticalContentAlignment="Top"

SelectedSlot="{Binding Source={StaticResource ViewModel}, Path=SelectedSlot,Mode=TwoWay}"

FirstDayOfWeek="Monday">

<I:Interaction.Triggers>

<I:EventTrigger EventName="AppointmentEditing">

<I:InvokeCommandAction Command="{Binding Source={StaticResource ViewModel}, Path=Command_AppointmentEditing}"/>

</I:EventTrigger>

<I:EventTrigger EventName="AppointmentCreating">

<I:InvokeCommandAction Command="{Binding Source={StaticResource ViewModel}, Path=Command_AppointmentCreating}"/>

</I:EventTrigger>

<I:EventTrigger EventName="VisibleRangeChanged">

<I:InvokeCommandAction Command="{Binding Source={StaticResource ViewModel}, Path=Command_VisibleRangeChanged}" CommandParameter="{Binding ElementName=RadScheduleView}" />

</I:EventTrigger>

</I:Interaction.Triggers>

<telerik:RadScheduleView.ViewDefinitions>

<telerik:DayViewDefinition DayStartTime="07:00:00" DayEndTime="19:00:00" MinTimeRulerExtent="1" MinorTickLength="30" />

<telerik:WeekViewDefinition DayStartTime="07:00:00" DayEndTime="19:00:00" MinTimeRulerExtent="1" MinorTickLength="30"/>

<telerik:MonthViewDefinition DayStartTime="07:00:00" DayEndTime="19:00:00" MinTimeRulerExtent="1" />

<telerik:TimelineViewDefinition VisibleDays="1" DayStartTime="07:00:00" DayEndTime="19:00:00" MinTimeRulerExtent="1" MinorTickLength="30" />

</telerik:RadScheduleView.ViewDefinitions>

<telerik:RadScheduleView.GroupDescriptionsSource>

<telerik:GroupDescriptionCollection>

<telerik:ResourceGroupDescription ResourceType="Resource2" />

</telerik:GroupDescriptionCollection>

</telerik:RadScheduleView.GroupDescriptionsSource>  

 

<telerik:RadScheduleView.AppointmentStyleSelector>

<local:AppointmentStyleSelector OutOfService="{StaticResource OutOfServiceStyle}"

MyBooking="{StaticResource MyBookingStyle}"

BookedByOther="{StaticResource BookedByOtherStyle}"

/>

 </telerik:RadScheduleView.AppointmentStyleSelector>

 

1 Answer, 1 is accepted

Sort by
0
Rosi
Telerik team
answered on 20 Oct 2011, 09:35 AM
Hello David,

Please try to reproduce the problem with our online demo. If the problem does not persist there I suggest you send us your running project to test it locally.

All the best,
Rosi
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
ScheduleView
Asked by
David
Top achievements
Rank 1
Answers by
Rosi
Telerik team
Share this question
or