If the grid on main window is just populated when the page loads, you just
call opener.location.reload() (javascript call) on pop-up and cause it to
reload the main page.
However, if it needs more work, i.e a postback like some button would have
caused it (say Button) and an event to handle, you could have a hidden
button control on main window:
<asp:Button ID="btnHidden" runat="server" />
and then an associated javascript function for it (also on main window)
function myPostBack()
{
<%=Page.GetPostBackEventReference(btnHidden,'')% >
}
This causes a postback event to be raised in behalf of the Button, when
myPostBAck is called. You could then call this on the pop-up window by:
opener.myPostBack();
and it causes the main window to be posted as if btnHidden would have been
clicked. So to handle this click you need to handle btnHidden's Click event.
of course, if you already have a Button (or other control) that does this,
you could cause the postback on behalf of it as well.
--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist
"Jay" <an*******@discussions.microsoft.com> wrote in message
news:01****************************@phx.gbl...
I have a situation where the user clicks on a button in a
DataGrid to launch a popup window via javascript. In the
popup window the user does some things that result in
changes to the underlying database the DataGrid is using
as a data source. When the popup window is closed I want
to refresh the main window -- i.e., cause a postback to
happen.
Is this possible?
From a user-interface perspective the popup window works
very nice. I know that I could perform the same funtion
in the main window but that would be messy.
Jay