'this.CurrentViews.length' is null or not an object

3 posts, 0 answers
  1. govME
    govME avatar
    2 posts
    Member since:
    May 2009

    Posted 19 Jan 2010 Link to this post

    Control: RADDatePicker

    The page the RadDatePicker sits has lots of javascript and ASP.NET controls such as gridview and form controls. 

    The issue:   The DatePicker works when page is initially loaded, but when a client or server side event is fired, and the user tries to click on the DatePicker calendar a javascript error occurs.

    the Error is:  'this.CurrentViews.length' is null or not an object.

    In the javascript the "CurrentView" is a child object of the Shared Calendar, on the initial load I can see it has properties and such, but becomes null when user fires client or server side event, even though all the other Shared Calendar properties are still there.

    I tried EnableViewState, with no success.  Any ideas why this is happening?
  2. Veli
    Veli avatar
    2002 posts

    Posted 22 Jan 2010 Link to this post

    Hello mary kay,

    When using shared calendars and AJAX, you need to make sure the shared calendar is loaded onto the page on initial load. The shared calendar cannot be loaded when you make an AJAX callback. If your shared calendar is not initially loaded on page, it client object will not be properly initialized and you will get exceptions stating some object does not support a property or a method.

    Alternatively, you need to make sure your shared calendar is placed inside your AJAX-ified content, so that whenever you make an AJAX callback, your shared calendar container is also updated.

    Kind regards,
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. govME
    govME avatar
    2 posts
    Member since:
    May 2009

    Posted 22 Jan 2010 Link to this post

    Thanks.  Your info was useful.  I will use it toward a solution   :)
Back to Top