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

Call parent page function while closing

1 Answer 114 Views
Window
This is a migrated thread and some comments may be shown as answers.
Guorui
Top achievements
Rank 1
Guorui asked on 22 Oct 2013, 08:08 AM
Hi all,

I want to rebind a radgrid in the parent page when a radwindow is closed.
This radgrid is using a Bind() method to get the data
protected void BindGrid()
{
      grdPersonnel.DataSource = GetPersonnelRoleParticipantList();
      grdPersonnel.DataBind();
 
}

in the radwindow
function GetRadWindow() {
            var oWindow = null; if (window.radWindow)
                oWindow = window.radWindow; else if (window.frameElement.radWindow)
                oWindow = window.frameElement.radWindow; return oWindow;
}
function closeWinAndRebind() {
            GetRadWindow().BrowserWindow.CalledFn();
            GetRadWindow().close();
}

in the parent page
function CalledFn() {
          document.getElementById('<%= btnSearch.ClientID %>').click();
}
 this btnSearch button is clicked to call the Bind() method

This does not work. How to achieve it?

Thanks
Guorui

1 Answer, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 22 Oct 2013, 10:38 AM
Hi Guorui,

Please take a look into this demo which deals the same scenario.

Thanks,
Shinu.
Tags
Window
Asked by
Guorui
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or