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

RadScheduler JavaScript runtime error

4 Answers 29 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Henry
Top achievements
Rank 1
Henry asked on 30 May 2017, 04:53 PM

I am getting the following error on Internet Explorer. When I hover over the scheduler calendar appointment. We just recently purchased telerik and wanted to see if other people have had the same issue.

0x800a138f - JavaScript runtime error: Unable to get property '_allowDelete' of undefined or null reference

4 Answers, 1 is accepted

Sort by
0
Peter Milchev
Telerik team
answered on 02 Jun 2017, 09:14 AM
Hello Henry,

Would you please confirm that the Scheduler - Creating Appointments with Drag-and-drop online demo is working as expected on your side - screencast

Also, would you please check if the Compatibility mode of Internet Explorer is disabled? 

If the issue is not replicated in the demo and the Compatibility mode is disabled, would you please modify the attached project so that it throws that error and send it back to us in an official support ticket?

To run the project, you should just place the Telerik assemblies in the Bin folder of the project.

Regards,
Peter Milchev
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Henry
Top achievements
Rank 1
answered on 12 Jun 2017, 05:14 PM

Hi Peter,

After looking through the demo code and some previous test code I developed, I found the issue. Please see my code below. I was doing a Databind on the RadScheduler when the event OnAppointmentCreated was fired. Can you please give me some feedback on why this would cause a JavaScript error client side.

 

protected void RadScheduler1_OnAppointmentCreated(object sender, AppointmentCreatedEventArgs e)
{
var lblArrival = e.Container.FindControl("lblArrival") as Label;
var lblDeparture = e.Container.FindControl("lblDeparture") as Label;
var lblPersonalFlgiht = e.Container.FindControl("lblPersonalFlight") as Label;
var lblSeats = e.Container.FindControl("lblSeats") as Label;
lblArrival.Text = e.Container.Appointment.Resources.GetResourceByType("AirportNameArr").Text;
lblDeparture.Text = e.Container.Appointment.Resources.GetResourceByType("AirportNameDep").Text;
var rowsLFightDetails = drFightDetails(Convert.ToInt32(e.Appointment.ID));
if (Convert.ToBoolean(rowsLFightDetails[0]["confidential"]))
{
e.Container.Appointment.BackColor = Color.OrangeRed;
}
lblPersonalFlgiht.Visible = Convert.ToBoolean(rowsLFightDetails[0]["personalflight"]);
lblSeats.Text = rowsLFightDetails[0]["availableseats"].ToString();
RadScheduler1.DataBind();
}

 

0
Peter Milchev
Telerik team
answered on 15 Jun 2017, 01:18 PM
Hello Henry,

Rebind in the AppointmentCreated event is not recommended as it disrupts the normal appointment binding process. Also, the AppointmentCreated is fired for every event, which would cause a big performance issue if the DataBind method is called in it. 

Would you please clarify what you are trying to achieve by rebinding in the AppointmentCreated event? Thus, we would be able to better understand your case and provide you more specific suggestions.

Regards,
Peter Milchev
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Henry
Top achievements
Rank 1
answered on 20 Jun 2017, 09:46 PM
I am still new to telerik and its application cycle. I thought since it was firing I needed to rebind it, which was a mistake. I now know that the AppointmentCreated event is done after all the data is added to the scheduler and we can do our specific display formatting when the AppointmentCreated event is fired. Thanks for the help. I have another issue but I will add a new question for it.
Tags
General Discussions
Asked by
Henry
Top achievements
Rank 1
Answers by
Peter Milchev
Telerik team
Henry
Top achievements
Rank 1
Share this question
or