Displaying changes on parent window in ASP.NET

Hi everyone.

I have a web application that displays info on a Infragistics ultrawebgrid control.
When you click on one of the details, it opens a new browser window to display all the detail in a form, so I can modify it or add a new record. This second window does not necesarly must be closed after adding each record. My question is: is there a way to update the first window (with the grid) each time that I save a record on the second?  I mean, adding records in one window browser, and displaying the changes on the other?

Thanks in advance
xigtechnomindAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

OMC2000Commented:
You could do it client side accessing parent window using javascript.
You can either call javascript method registered in the parent window or directly update object properties in the parent window or just make it to reload:

function refreshOpener(refreshFromServer)
{
   if ( !window.opener || window.opener.closed )
     return;
   if ( refreshFromServer ) {
   // if you want to refresh opener content with data from the server:  
     window.opener.document.location = window.opener.document.location;
   } else {
// if you want to assign some field values from popup to opener
     if( window.opener.document.forms.opener_form_name.field_name )
       window.opener.document.forms.opener_form_name.field_name1.value = window.document.forms.popup_form_name.field_name2.value;
   }
}


//call parent window function:

window.opener.Build(window.document.forms.popup_form_name.field_name2.value);
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
xigtechnomindAuthor Commented:
so, If I want to reload the parent page from the popup I only need the following function on the popup?

function refreshOpener(refreshFromServer)
{
   if ( !window.opener || window.opener.closed )
     return;
   if ( refreshFromServer ) {
   // if you want to refresh opener content with data from the server:  
     window.opener.document.location = window.opener.document.location;
   }
}

And I must call that function each time that I save a record on the popup, right?

Thanks again
0
OMC2000Commented:
yes
0
xigtechnomindAuthor Commented:
Thanks
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP.NET

From novice to tech pro — start learning today.