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

element parent node is null for radwindow

1 Answer 98 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 2
Gajanan asked on 13 Sep 2010, 05:09 AM

my problem is, i am using the radgrid in that i am showing the status of each row (it is a hyperlink)
on click of status i am showing the radwindow in that i have option to change the status for that row.
on rad window i have 2 buttons Save and close on on save i am saving the status in database and redirecting to the parent page
while redirecting it should refresh the parent page and update the status of that row.
even on close button i want same ,

but now it is refreshing the page only first time when i open the radwindow and closed it but after i want to change the status of second row i am getting the jscript error "element parent node is null" and "Object doesnot support property or method" after this idid some changes,
i used  DestroyOnClose="true"  then it is showing the
my code is below on Parent page
i using the
<telerik:RadAjaxPanel ID="rjxPanel_PurchaseOrder" runat="server"
                    LoadingPanelID="RadAjaxLoadingPanel1" Width="100%" Height="100%" >
            <div id="RestrictionZone" class="module" style="margin-top: 4px; height: 300px; width: 400px;">
                    <telerik:RadWindowManager ID="RadWindowManager1" runat="server" style="z-index:7001">
                            <telerik:RadWindow runat="server" ID="RadWindow1" ReloadOnShow="true"
                                ShowContentDuringLoad="true" Modal="true"
                                Height="560px" Width="620px" NavigateUrl="ManagePurchaseOrder.aspx"
                                Animation="Fade" />
function ChangeStatus(OrderID)
           var EntityID =document.getElementById("ctl00_ContentPlaceHolder1_HiddenField_EntityID").value;
          // window.showModalDialog('ManageStatusChange.aspx?EntityID=' + EntityID + '&EntityType=PurchaseOrder&EntityKeyID='+OrderID , this, "status:no;help:no;overflow:auto;center:yes;dialogWidth:775px;dialogHeight:675px");
           var PopupWindow=radopen('ManageStatusChange.aspx?EntityID=' + EntityID + '&EntityType=PurchaseOrder&EntityKeyID='+OrderID , "RadWindow1");
function refreshParent(arg)
             //Get reference to RadAjaxManager on page  
            if (radManager == null)       
            var radManager = $find('<%= RadAjaxManager.GetCurrent(this).ClientID %>'); 
            //Fire ajax request (optionally pass an event arg value)
in parentAspx.cs
#region RadAjax CodeBlock
        RadAjaxManager rjxManager = RadAjaxManager.GetCurrent(this);
        //Create a new delegate to handle the AjaxRequest event  
        rjxManager.AjaxRequest += new RadAjaxControl.AjaxRequestDelegate(rjxManagerPurchaseOrder_AjaxRequest);
        rjxManager.AjaxSettings.AddAjaxSetting(rjxManager, rjxPanel_PurchaseOrder);
#region Rad Ajax Event
    protected void rjxManagerPurchaseOrder_AjaxRequest(object sender, AjaxRequestEventArgs e)
        if (e.Argument == "Rebind")
            Session["currentObject"] = null;

and another page which will show in radwindow

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
<script type="text/javascript">  
 function GetRadWindow()
       var oWindow = null;
            if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog
            else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;//IE (and Moz as well)
            return oWindow;
function closeRadWindow()  
 function CloseAndRebind(args)

and on close button :-
<asp:Button ID="btnClose_Top" runat="server" Text="Close"            
                        OnClientClick="javascript:closeRadWindow();return false;" />

and on save button

string script = "<script>CloseAndRebind('Rebind')</" + "script>";
                ScriptManager.RegisterStartupScript(this, this.GetType(), "CloseAndRebind", script, false); 

PlZ plz tell the solution

1 Answer, 1 is accepted

Sort by
Telerik team
answered on 14 Sep 2010, 03:35 PM
Hello Gajanan,

Please take a look at the Window Editing demo to see how the desired functionality can be implemented.

I hope this helps.

the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Asked by
Top achievements
Rank 2
Answers by
Telerik team
Share this question