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

Why is the AppointmentCreated fired when the view definition changes?

0 Answers 66 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Myles
Top achievements
Rank 1
Myles asked on 23 Apr 2012, 05:24 PM
I have a RadScheduleView that uses the command pattern e.g.

 

        <telerik:RadScheduleView
            HorizontalAlignment="Stretch"
            Name="radScheduleMovements"
            VerticalAlignment="Stretch"
            VisibleRangeChangedCommand="{Binding VisibleRangeChanged}"
   VisibleRangeChangedCommandParameter="{Binding VisibleRange, RelativeSource={RelativeSource Self}}"           
            AppointmentsSource="{Binding Movements}"
            EditAppointmentDialogStyle="{StaticResource EditAppointmentDialogStyle}">
            <telerik:RadScheduleView.ViewDefinitions>
                <telerik:DayViewDefinition />
                <telerik:WeekViewDefinition />
                <telerik:MonthViewDefinition />
                <telerik:TimelineViewDefinition />
            </telerik:RadScheduleView.ViewDefinitions>

            <i:Interaction.Triggers>

                <i:EventTrigger EventName="AppointmentCreated">
                    <Command:EventToCommand Command="{Binding AppointmentCreatedCommand}" PassEventArgsToCommand="True" />
                </i:EventTrigger>

                <i:EventTrigger EventName="AppointmentEdited">
                    <Command:EventToCommand Command="{Binding AppointmentEditedCommand}" PassEventArgsToCommand="True" />
                </i:EventTrigger>

            </i:Interaction.Triggers>
        </telerik:RadScheduleView>


My problem is this.  When in the month view the AppointmentCreated event is getting fired when you double click on a day slot header.  The view definition correctly changes to the day view but not without first firing the AppointmentCreated event.  How can I prevent this?

 

Tags
ScheduleView
Asked by
Myles
Top achievements
Rank 1
Share this question
or