Sys.ArgumentNullException: value cannot be null: parameter name: panelsCreated[6]

2 posts, 0 answers
  1. Joseph
    Joseph avatar
    11 posts
    Member since:
    Jul 2015

    Posted 11 Apr Link to this post

    Hi,

    I am experiencing an exception Sys.ArgumentNullException: value cannot be null: parameter name: panelsCreated[6].

    Not sure what is causing it, but I suspect the exception has something to do with RadWindow since it occurs when I open a RadWindow repeatedly.

    Thanks in advance.

    The markup for the 2 RadWindows are as follows:

    <telerik:RadWindowManager ID="Singleton" runat="server" Animation="None" Behaviors="Move"
            Width="900px">
            <windows>
                <telerik:RadWindow ID="rwProtoResponseMediaEdit" Behaviors="Move, Resize, Maximize" Skin="Telerik"
                    VisibleStatusbar="false" ReloadOnShow="false" OnClientClose="rwProtoResponseMediaEdit_ClientClose"
                    BorderWidth="0" Width="950px" Modal="true" runat="server" Height="530px" Title="Prototype Media"
                    NavigateUrl="~/Agency/Authoring/ProtoResponseMediaEdit.aspx">
                </telerik:RadWindow>
                <telerik:RadWindow ID="rwResource" runat="server" Title="Pick a Resource" VisibleStatusbar="false"
                    Modal="true" NavigateUrl="~/Agency/Search/ResourceSearch.aspx"
                    Width="800" Height="650">
                </telerik:RadWindow>
                <telerik:RadWindow ID="rwPatientProfileEdit" Behaviors="Move, Resize, Maximize" Skin="Telerik"
                    VisibleStatusbar="false" ReloadOnShow="false" OnClientClose="rwPatientProfileEdit_ClientClose"
                    BorderWidth="0" Width="950px" Modal="true" runat="server" Height="530px" Title="Prototype Patient"
                    NavigateUrl="~/Agency/Authoring/PatientProfileEditEdit.aspx">
                </telerik:RadWindow>
                <telerik:RadWindow ID="rwPrototypeMediaEdit" Behaviors="Move, Resize, Maximize" Skin="Telerik"
                    VisibleStatusbar="false" ReloadOnShow="false" OnClientClose="rwPrototypeMediaEdit_ClientClose"
                    BorderWidth="0" Width="950px" Modal="true" runat="server" Height="530px" Title="Prototype Media"
                    NavigateUrl="~/Agency/Authoring/PrototypeMediaEdit.aspx">
                </telerik:RadWindow>
                <telerik:RadWindow ID="rwPrototypeSummary" Behaviors="Move, Resize, Maximize" Skin="Telerik"
                    VisibleStatusbar="false" ReloadOnShow="false" OnClientClose="rwPrototypeSummary_ClientClose"
                    BorderWidth="0" Width="950px" Modal="true" runat="server" Height="530px" Title="Prototype Summary"
                    NavigateUrl="~/Agency/Authoring/PrototypeSummary.aspx">
                </telerik:RadWindow>
                <telerik:RadWindow ID="rwPrototypeQuestionTypeChange" Behaviors="Move, Resize, Maximize" Skin="Telerik"
                    VisibleStatusbar="false" ReloadOnShow="false" OnClientClose="rwPrototypeQuestionTypeChange_ClientClose"
                    BorderWidth="0" Width="950px" Modal="true" runat="server" Height="530px" Title="Prototype Question Type"
                    NavigateUrl="~/Agency/Authoring/PrototypeQuestionTypeChange.aspx">
                </telerik:RadWindow>
                <telerik:RadWindow ID="rwPrototypeBlueprint" Behaviors="Move, Resize, Maximize" Skin="Telerik"
                    VisibleStatusbar="false" ReloadOnShow="false" OnClientClose="rwPrototypeBlueprint_ClientClose"
                    BorderWidth="0" Width="950px" Modal="true" runat="server" Height="530px" Title="Prototype Blueprint"
                    NavigateUrl="~/Agency/Authoring/PrototypeBlueprint.aspx">
                </telerik:RadWindow>
            </windows>
        </telerik:RadWindowManager>

     

    The javascript for opening the RadWindows are as follows:

    function OpenProtoResponseMediaEdit(prid, prrrsi)
                {
                    var url = '<%= ConvertRelativeUrlToAbsoluteUrl("~/Agency/Authoring/ProtoResponseMediaEdit.aspx") %>';
                    url = url + "?prid=" + prid + "&prrrsi=" + prrrsi;
     
                    logsafe(url);
     
                    var oWnd = $find("<%= rwProtoResponseMediaEdit.ClientID %>");
                    //oWnd.set_behaviors(Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Move + Telerik.Web.UI.WindowBehaviors.Resize + Telerik.Web.UI.WindowBehaviors.Maximize);
                    oWnd.set_behaviors(Telerik.Web.UI.WindowBehaviors.Move + Telerik.Web.UI.WindowBehaviors.Resize + Telerik.Web.UI.WindowBehaviors.Maximize);
                    oWnd.show();
                    oWnd.setSize(950, 800);
                    oWnd.setUrl(url);
                    oWnd.minimize();
                    oWnd.maximize();
                    oWnd.restore();
                    oWnd.center();
                }
     
                function rwProtoResponseMediaEdit_ClientClose(sender, args) {
     
                    var arg1 = args.get_argument();
     
                    //logsafe("rwProtoResponseMediaEdit_ClientClose");
                    //logsafe(arg1);
                    if (arg1 && arg1.indexOf('ok') === 0) {
                        SetNeedToConfirm('true');
                        //alert('needToConfirm = true');
                    }
     
                    var hidAddOptionsMediaAjax = $('#' + '<%=hidAddOptionsMediaAjax.ClientID%>');
                    var btnAddOptionsMediaAjax = $('#' + '<%=btnAddOptionsMediaAjax.ClientID%>');
     
                    hidAddOptionsMediaAjax.val(arg1);
                    btnAddOptionsMediaAjax.click();
                }
     
     //Get current RadWindow
                        function GetRadWindow() {
                            var oWindow = null;
                            if (window.radWindow)
                                oWindow = window.radWindow;
                            else if (window.frameElement && window.frameElement.radWindow)
                                oWindow = window.frameElement.radWindow;
                            return oWindow;
                        }
     
                        function CloseRadWindow(arguments) {
                            var wnd = GetRadWindow();
                            wnd.close(arguments);
                        }
     
                        function OpenResourcePicker() {
     
                            var oWindow = GetRadWindow();
     
                            var oManager = oWindow.get_windowManager();
     
                            setTimeout(function () {
     
                                var winResourceSearch = oManager.getWindowByName("rwResource");
                                //winResourceSearch.remove_close(rwResource_ClientClose); // Remove the close handler, if exist
                                winResourceSearch.add_close(rwResource_ClientClose); // Set the close handler
     
                                oManager.open(null, "rwResource"); // Open RadWindow via RadWindowManager
                            }, 0);
                        }
     
                        function rwResource_ClientClose(sender, args) {
                            //logsafe('ProtoResponseMediaEdit rwResource_ClientClose');
                            //logsafe(args.get_argument());
     
                            var arg1 = args.get_argument();
     
                            sender.remove_close(rwResource_ClientClose); // Remove the close handler, if exist
     
                            setTimeout(
                                function () {
                                    var hidResourcePickerPostback = $('#' + '<%=hidResourcePickerPostback.ClientID%>');
                                    hidResourcePickerPostback.val(arg1);
     
                                    var btnResourcePickerPostback = $('#' + '<%=btnResourcePickerPostback.ClientID%>');
                                    btnResourcePickerPostback.click();
                                }, 100);
                        }

  2. Vessy
    Admin
    Vessy avatar
    1383 posts

    Posted 13 Apr Link to this post

    Hi Joseph,

    We are not aware of the reported behavior and, unfortunately, the provided code was not enough to reproduce it at our end. Can you provide a little more details on the exact scenario in which the problem occurs?
    • Can you verify that there are no any JavaScript errors thrown on the page?
    • Can you verify that you are using the latest version of the controls like stated into the ticket info?
    • In case you are using AJAX updates, can you try to disable the AJAX on the page and see whether the problem persists?

    Last but not least, can you, please, try to isolate the issue into a stand-alone project following the instructions of this blog post and send it so we can examine it further?

    Regards,
    Vessy
    Telerik
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top