title: silverlight 4 and Refresh Parent Window when Child Window closed
body: <p>In my SL4 App I have a Parent Page where I'm displaying a datagrid.
  I open the ChildWindow when the user selects a  particular Row in the grid and clicks on Open button using the following code.</p>
  
  <pre><code>cwEditProduct ChildWin = new cwEditProduct(productId);
  ChildWin.Closed += new EventHandler(ChildWin_Closed);
  ChildWin.Show();
  </code></pre>
  
  <p>and When the user closes the ChildWindow the following code runs but it is not refreshing the parent grid with updates.</p>
  
  <pre><code>void ChildWin_Closed(object sender, EventArgs e)
      {
          LoadProducts();
      }
  </code></pre>
  
  <p>If I go to another page and come back to this it works fine but not from the childWin closed event.</p>
  
  <p>I have noticed during the debugging that the ChildWin_Closed gets called soon I press the Close button on the Child Window and it runs the remaining code in the close button and then closes the window. Is it just because of timing or I'm doing something wrong??</p>
  
  <p>Any response would be much appreciated</p>