Telerik.Web.UI.WindowManager.Manager is undefined so RadConfirm is not working

2 posts, 0 answers
  1. Rosalini
    Rosalini avatar
    1 posts
    Member since:
    Dec 2014

    Posted 17 Aug Link to this post

    Hi Team, 

    I have added RadConfirm() in the ASCX code behind on radbutton click page. But it's failing  in runtime throwing the runtime script error "JavaScript runtime error: Unable to get property 'radconfirm' of undefined or null reference".

    window.radconfirm=function(h,a,g,d,b,f,c){var e=GetRadWindowManager();

    return e.radconfirm(h,a,g,d,b,f,c);

    };

    here 'e' is undefined. 

    My ascx code behind 

     else if (projectDropdown == ApplicationConstants.WF_CURRENCY_CONVERSION_CUBE_DISPLAY)
                            {
                                string Tag = string.Empty;
                                string confirmMsg = string.Empty;
                                List<string> factTag = presenter.GetFactTagAssociated(projectId, DsId);
                                if (factTag.Count > 0)
                                {
                                    confirmMsg += "The listed facts will be impacted. <br/>";
                                    foreach (string tag in factTag)
                                    {
                                        Tag += tag + ",";
                                    }
                                    confirmMsg += Tag;
                                 
                                    confirmMsg += " <br/> Do you want to continue?";
                                }
                           
                               RadAjaxManager.GetCurrent(Page).ResponseScripts.Add("radconfirm('" + confirmMsg + "', callbackFunctionPerformStartProcessValidation , 300 ,100 , null ,'" + ApplicationConstants.CLOSE + "' )");

                                return;
                            }

     

    ascx Script block

      function callbackFunctionPerformStartProcessValidation(arg) {
                    if (arg) {
                        debugger;
                        var argument = "Start Process";
                        $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest(argument);
                    }
                }

    I have added telerik:RadWindowManager above the radscript block and below the script block too. but it's not working.

    Please let me know how to progress. It's blocking me.

     

    Thanks,

    Rosalini

  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3908 posts

    Posted 22 Aug Link to this post

    Hello Rosalini,

    My first suggestion is to use the server-side RadConfirm() method the RadWindowManager instance exposes: http://demos.telerik.com/aspnet-ajax/window/examples/browserdialogboxes/defaultcs.aspx.

    If this is not suitable for you, make sure to use the Sys.Application.Load event to call the script: http://docs.telerik.com/devtools/aspnet-ajax/controls/window/troubleshooting/executing-javascript-code-from-server.

    Also, as a general rule, I suggest that you avoid updating the RadWindowManager with AJAX, it operates primarily in the browser.

    Regards,

    Marin Bratanov
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top