Javascript error when hovering after postback

3 posts, 0 answers
  1. Chet
    Chet avatar
    4 posts
    Member since:
    Oct 2011

    Posted 12 Oct 2011 Link to this post

    When I make a change to the schedule, or if I view the AdvancedEditForm for a particular appointment, I start getting the following error when I hover over an appointment:

    Unable to get value of the property 'get_allowDelete': object is null or undefined

    If I add a new appointment the page refreshes (via Ajax, not a full postback).  I can hover over the new appointment without a problem, but any existing appointments will throw this error.

    When I step through the JavaScript debugger, I see that there is a call to get_element(), and this method looks in the first position of the _domElements array.  In my case, the first entry is null, but the second contains the element that it should be returning.
  2. Ivana
    Ivana avatar
    657 posts

    Posted 14 Oct 2011 Link to this post

    Hello Chet,

    I did not manage to reproduce the described behavior. I tested the get_allowDelete() and get_allowEdit() methods of the appointment client-side object and everything worked as expected.

    Could you please provide me with some more information about the issue in question? You could send us a support ticket with a sample page illustrating the issue attached to it, so we will be able to troubleshoot that kind of a behavior locally. 

    Thank you in advance.

    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
  3. Chet
    Chet avatar
    4 posts
    Member since:
    Oct 2011

    Posted 14 Oct 2011 Link to this post

    Sorry, I thought I had closed this question.

    I had a custom ScheduleProvider which was caching the appointment objects.  After a more careful examination of XmlScheduleProvider, I noticed that new Appointment objects need to be created every time GetAppointments is called.  If you don't do this, the AppointmentControls collection fills up with out-of-date entries which cause get_allowDelete to break.
Back to Top