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

Appointments disappearing after edit

1 Answer 68 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Ruaan
Top achievements
Rank 1
Ruaan asked on 22 Mar 2016, 09:18 AM

Hi, I have a schedule view that when an appointment is edited, it disappears every second time. Please help.

                           <telerik:RadScheduleView x:Name="MainSchedule" 
                                                         Grid.Row="1" 
                                                         Margin="2" 
                                                         TimeMarkersSource="{Binding TimeMarkers}"
                                                         CategoriesSource="{Binding Categories}"  
                                                         MinAppointmentHeight="10" 
                                                         NavigationHeaderVisibility="Collapsed" 
                                                         AppointmentsSource="{Binding WorkOrderTasks}" 
                                                         AppointmentCreated="MainSchedule_AppointmentCreated"
                                                         ResourceTypesSource="{Binding ResourceTypes}" 
                                                         AppointmentDeleted="MainSchedule_AppointmentDeleted" 
                                                         AppointmentEdited="MainSchedule_AppointmentEdited"
                                                         CurrentDate="{Binding ElementName=TimeBar,Mode=TwoWay, Path=SelectionStart}" 
                                                         SelectedAppointment="{Binding SelectedWorkOrderTask,Mode=TwoWay}"
                                                         FirstVisibleTime="8:00:00" 
                                                         ShowAppointmentDeleteButton="False"
                                                         ToolTipTemplate="{StaticResource AppointmentToolTipTemplate}">

               
        private void MainSchedule_AppointmentEdited(object sender, AppointmentEditedEventArgs e)
        {
            VisualPlanningBoardViewModel vm = (VisualPlanningBoardViewModel)this.DataContext;
            if (vm != null)
            {
                vm.UpdateWorkOrderTask((WorkOrderTask)e.Appointment);
                vm.UpdateSchedules();               
            }                  
        }

 

      public void UpdateSchedules()
        {
            UpdateMinimap();               
            this.RaisePropertyChanged(() => this.WorkOrderTasks);
            this.RaisePropertyChanged(() => this.MiniMapWorkOrderTasks);
            
        }

1 Answer, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 24 Mar 2016, 09:04 AM
Hi Ruaan,

The provided code is not enough for us to find what could cause such a strange behavior.  I have noticed the UpdateMinimap() method, so I guess you're following our ScheduleView and Timebar example, right?
I'd ask you to try to isolate the issue in a simpler demo project ( without database connections) and send it to us, so we to be able to debug it and provide proper assistance.

Regards,
Yana
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Tags
ScheduleView
Asked by
Ruaan
Top achievements
Rank 1
Answers by
Yana
Telerik team
Share this question
or