RadPane is null

3 posts, 0 answers
  1. Ricky
    Ricky avatar
    1 posts
    Member since:
    Jan 2015

    Posted 01 Jan 2015 Link to this post


    I have a site using splitters and multiple radpanes. One of those radpane contains a graph reports. After a user logins, we have javascript that resizes the radpane that contains the report based on the actual size of the report (a multipage). The radpane in question is nested inside a splitter.
    Now it all works most of the time but occasionally we get null when we try to get the radpane object. This is the code below:

    var reportpane = $find("<%= RadPaneReporting.ClientID %>");

    We noticed it happens on IE9. We have tried it on IE8, and IE11 and there seems to be no issue. FYI, we are using version 2011.3.1115.35 of the Telerik controls.

    Hope you guys can shed some light on this strange issue.

  2. Eric
    Eric avatar
    3 posts
    Member since:
    Feb 2014

    Posted 02 Jan 2015 in reply to Ricky Link to this post

    I'm not so sure it's browser specific ... 
    Whenever I run into that situation - controls are sometimes null in a javascript function - it seems due to timing of the page reload and whether or not the control(s) are being managed by the rad ajax manager or not.
    I also try replacing $find with getElementById - and sometimes $('#controlname') and attempt to cast it as a telerik control

    I've yet to find that "for sure solution" though.  
    Each situation seems similar but different - so I wind up trying several ways and checking the results in the developer tools console.

  3. Vessy
    Vessy avatar
    1870 posts

    Posted 06 Jan 2015 Link to this post

    Hi guys,

    The most probable reason for the experienced problem is that you are trying to get a reference to the RadPane instance in a too early moment, when its client object is not yet created. Can you try giving a little timeout to the problematic function wrapping it into setTimeOut() and see whether this will help in solving the issue?

    If not, can you prepare a sample page we can test the problem on our side with and examine what might be causing it?

    Looking forward to hearing from you,

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top