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

RadPane is null

2 Answers 45 Views
Splitter
This is a migrated thread and some comments may be shown as answers.
Ricky
Top achievements
Rank 1
Ricky asked on 02 Jan 2015, 04:31 AM
Hi,

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.
Thanks.

Ricky.

2 Answers, 1 is accepted

Sort by
0
Eric
Top achievements
Rank 1
answered on 02 Jan 2015, 11:10 PM
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.


0
Vessy
Telerik team
answered on 06 Jan 2015, 04:58 PM
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,
Vessy
Telerik
 

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.

 
Tags
Splitter
Asked by
Ricky
Top achievements
Rank 1
Answers by
Eric
Top achievements
Rank 1
Vessy
Telerik team
Share this question
or