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

Telerik.Windows.Controls.ScheduleView : System.InvalidOperationException:at System.Windows.Data.CollectionView.DeferRefresh

3 Answers 194 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Uma
Top achievements
Rank 1
Uma asked on 19 Jun 2019, 06:05 AM

Hi Team,

We have prepared a sample for DeferRefresh issue. While creating a Appointment, changing the currentdate(View Refresh) for scheduler, it is thrown "Deferrefresh is not allowed during an addnew or edit item transaction" exception. 

In our application, we have refresh the scheduler view (Changing current date) continuously through bindable property and immediately creating the appointment. Here we are getting this exception.

Sample : https://drive.google.com/file/d/1IL_fqyugJDj2VMX7lqxGXbro1rtRU7sM/view?usp=sharing

Please suggest how to handle this issue?

Thanks,
Srinivasan

3 Answers, 1 is accepted

Sort by
0
Uma
Top achievements
Rank 1
answered on 19 Jun 2019, 01:24 PM
Any update on this?
0
Véronique
Top achievements
Rank 1
answered on 22 Oct 2019, 02:49 PM

Hi,

Did you resolve your issue ? If yes, what did you do ?

I have the same error on schedule view.

Thanks,

Véronique

0
Dilyan Traykov
Telerik team
answered on 25 Oct 2019, 09:22 AM

Hi Véronique,

I'm uncertain as to whether and how Uma solved the issue, however, in the provided sample project, the exception can be resolved by placing the change of the CurrentDate property in the BeginInvoke method of the Dispatcher:

        private void radScheduleView1_AppointmentCreating(object sender, AppointmentCreatingEventArgs e)
        {
            Dispatcher.BeginInvoke(new Action(() =>
            {
                radScheduleView1.CurrentDate = DateTime.Now;
            }));
        }
Please let me know if a similar approach works for you as well. If that is not the case, please send over the project in which you observe the exception and I will gladly try to come up with a viable solution for your specific context.

Regards,
Dilyan Traykov
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
ScheduleView
Asked by
Uma
Top achievements
Rank 1
Answers by
Uma
Top achievements
Rank 1
Véronique
Top achievements
Rank 1
Dilyan Traykov
Telerik team
Share this question
or