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

_events is null

4 Answers 114 Views
Window
This is a migrated thread and some comments may be shown as answers.
Torsten
Top achievements
Rank 1
Torsten asked on 09 May 2011, 04:14 PM
We have a Problem with a RadWindow on RadAjaxPanel

On our Masterpage we have:

<div id="paneInhalt" style="float: left; width: 2000px; border-left: solid 2px silver;
    overflow: auto; visibility: hidden">
    <telerik:RadAjaxLoadingPanel runat="server" ID="RadAjaxLoadingPanel1">
    </telerik:RadAjaxLoadingPanel>
    <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel1">
        <asp:ContentPlaceHolder ID="cphHauptInhalt" runat="server">
        </asp:ContentPlaceHolder>
    </telerik:RadAjaxPanel>
</div>

And on a usercontrol in content:

<telerik:RadWindow runat="server" ID="pnlBearbeiten" Overlay="true" VisibleStatusbar="false"
    Modal="true" Height="600" Width="950" KeepInScreenBounds="True" VisibleTitlebar="False">
    <ContentTemplate>
        <uc3:EBetriebeAuswahl ID="etlFilialen" runat="server" />
        <br />
        <div style="float: right">
            <telerik:RadButton runat="server" ID="btnAbbrechen" Text="Abbrechen" AutoPostBack="False"
                OnClientClicked="HideAbnehmerauswahl">
                <Icon PrimaryIconCssClass="rbCancel" />
            </telerik:RadButton>
            <telerik:RadButton runat="server" ID="btnSave" OnClientClicking="disableCheckSave"
                Text="Speichern" OnClick="btnSpeichern_Clicked">
                <Icon PrimaryIconCssClass="rbSave" />
            </telerik:RadButton>
        </div>
        <p style="clear: both" />
    </ContentTemplate>
</telerik:RadWindow>

When the usercontrol is loaded, I get an error: "Error: '_events' is Null or not an Object".

If the page is loaded without this control, the error didn't occure, the same if i remove the window.

In some posts I have read about the problem is beeing fixed in Version 2010.1.??? But we are using 2011.1.315.35 and the problem exists.

How can I fix this?

4 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 11 May 2011, 05:58 PM

Hello Torsten,

Based on the provided information I was not able to reproduce this issue. You can find my test page attached and a video from my experiment on the following link: http://screencast.com/t/1Whh99uMz. Please note that I have commented out your user control since I do not have it. Without it no error is thrown (it is not present on the page in both the cases you described as error free, too), so I must conclude that the issue lies there.

The similar error you have come across the forums is encountered in the disposing of an element that has its handlers modified, not when it is loaded. This issue with the RadWindow has been fixed in Q2 2010 and you should not be experiencing it.

What I can suggest at the current state of affairs is to check whether the error actually originates in your custom user control and try to eliminate it. If you are still experiencing difficulties please open a support ticket and send us a simple, fully runnable sample that displays this issue, along with detailed reproduction steps.



Greetings,
Marin
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
Rory
Top achievements
Rank 1
answered on 02 Mar 2012, 07:19 PM
I am getting the same error in the latest 2012 version of Telerik randomly when opening Radwindows from a RadGrid. Our function being called from the RadGrid seems to open windows fine most of the time but throws this error everyday for no apparent reason.

In IE8 I get a _events null error at this section where f = propertychange.

 

 

var c=a._events[f]||[];
In IE9 I get a similar cannot get property 'propertychange' error.

Here is our function that opens the RadWindow onclick in a grid item.

function ShowEditForm(id)
{
  var oWin = window.parent.radopen("Controls/Editor.aspx?ID=" + id, "GridEditor");
  oWin.Argument = "";
  return false
}


Please advise.

 
0
Marin Bratanov
Telerik team
answered on 06 Mar 2012, 11:30 AM
Hello Rory,

There has been a bug when a  RadGrid was placed in a RadWindow, but this has been fixed in Q2 2010. Similar errors have been reported when controls have been incorrectly ajaxified, e.g. nested update panels, as this may cause the dispose() method of the control to be called multiple times. Such a scenario should generally be avoided and such an error in it comes from the way AJAX works, not from the RadControls, which are built on top of this functionality.

Please also try with a different (e.g. blank) page, as it is possible that the error is thrown from something inside it, not from the RadWindow. If the issues stems from the content page please try resolving it. A possible reason for its disposal can be the DestroyOnClose property of the RadWindowManager being set to true, which I believe you can remove since you pass a hardcoded name as a second parameter to the radopen() function, so I do not believe it is necessary.


Greetings,
Marin
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.
0
Rory
Top achievements
Rank 1
answered on 06 Mar 2012, 05:59 PM
Hi Marin,
Thanks for your feedback and help. I think we fixed it by getting away from update panels!
*knocks on wood*

I first narrowed it down to something on the form inside the window by opening a blank page like you suggested. I then narrowed it down to something ajaxified in the form by turning off ajax. I then changed my ajaxmanager settings to specifically ajaxify the 4 controls that I am updating in ajax instead of ajaxifying the whole form via an update panel.

So the error for us appears to be a result of ajaxifying a panel full of custom form controls inside a radwindow.

Take Care,

Rory
Tags
Window
Asked by
Torsten
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Rory
Top achievements
Rank 1
Share this question
or