Cannot read property 'refreshAppointments' of undefined ( v16.0.1.26)


Hello, good afternoon, I have problem with the "refreshAppointments" this is my razor and I load the scheduler well, but when I want to reload it with the javascript function says:

Cannot read property 'refreshAppointments' of undefined

in this way I charge the scheduler:


                        @section ControlsSection{

                            @(Html.EJ().Schedule("Schedule1")
                                .Width("95%")
                                .Height("900px")
                                .EnableLoadOnDemand(true)
                                 .Locale("es-ES")
                                 .TimeZone("UTC -00:00")
                                .CurrentDate(DateTime.Now)
                                .ShowQuickWindow(true)
                                .AllowInline(false)
                                .EnableAppointmentResize(true)
                                .AppointmentSettings(fields => fields.Datasource(ds => http://localhost:8080/Calendar/LoadData).CrossDomain(true))
                                    .Id("Id")
                                    .Subject("Subject")
                                    .StartTime("StartTime")
                                    .EndTime("EndTime")
                                    .Description("Description")
                                    .AllDay("AllDay")
                                    .Recurrence("Recurrence")
                                    .RecurrenceRule("RecurrenceRule"))
                                .ScheduleClientSideEvents(e => e.AppointmentWindowOpen("onAppointmentWindowOpen")
                                    .CellDoubleClick("onCellDoubleClick")
                                    .AppointmentClick("onAppointmentClick")
                                    .Create("onCreate")
                                    .DragStop("onDragAndDrop")
                                    .ResizeStop("onResize")
                                    )
                                )
                        }
                   

this is my version:  asp.mvc ej1
/*!
*  filename: ej.web.all.min.js
*  version : 16.1.0.26
*  Copyright Syncfusion Inc. 2001 - 2018. All rights reserved.
*  Use of this code is subject to the terms of our license.
*  A copy of the current license can be obtained at any time by e-mailing
[email protected]. Any infringement will be prosecuted under
*  applicable laws. 
*/

3 Replies

NR Nevitha Ravi Syncfusion Team April 8, 2018 05:00 PM UTC

Hi Maurici, 

Thank you for contacting Syncfusion Support. 

We suspect that the refreshApppointments method is getting called before the scheduler renders on the page, which might cause such reported problem. We have prepared a simply sample, by calling refreshAppointments method of schedule within the button click event which can be downloaded from the following location. 

Please check the above sample, and if you face same issue - kindly revert us with the details on which scenario or where you have called the refreshAppointments method and also if possible share the schedule code snippets too to proceed further on this. 

Regards, 
Nevitha. 



MH Mauricio Hernandez April 9, 2018 02:39 PM UTC

Thank u, my problem is with Jquery, if i render Jquery library, don't load e$("#Schedule1").ejSchedule("instance") method 


NR Nevitha Ravi Syncfusion Team April 10, 2018 04:54 PM UTC

Hi Mauri, 

Thanks for your update and we are happy that your issue got resolved. Kindly let us know, if you need any other assistance. 

Regards, 
Nevitha. 


Loader.
Up arrow icon