title: Refresh user control instance inside a panel when a button is clicked
body: <p>I have these codes in my <code>Mainform</code> that when I click on a <code>picturebox</code>, a <code>user control</code> then loads in the a panel. </p>
  
  <p>My problem is the <code>datagridviews</code> inside other controls doesn't get updated. When I make transactions in other <code>user controls</code> that affects other <code>user controls</code>. </p>
  
  <p>What I want now is to automatically update those <code>gridviews</code> by refreshing the <code>user control</code> when their associated <code>button</code> is <code>clicked</code>.</p>
  
  <pre><code>private void pictureBox5_Click(object sender, EventArgs e)
  {
      panel2.Controls.Add(UCCustomer.Instance);
      UCCustomer.Instance.Dock = DockStyle.Fill;
      UCCustomer.Instance.BringToFront();
      lblMenu.Text = "Customer Management";
  }
  
  private void pictureBox2_Click(object sender, EventArgs e)
  {
      panel2.Controls.Add(UCDelivery.Instance);
      UCDelivery.Instance.Dock = DockStyle.Fill;
      UCDelivery.Instance.BringToFront();
      lblMenu.Text = "Delivery Management";
  }
  
  private void pictureBox3_Click(object sender, EventArgs e)
  {
      panel2.Controls.Add(UCReport.Instance);
      UCReport.Instance.Dock = DockStyle.Fill;
      UCReport.Instance.BringToFront();
      lblMenu.Text = "Reports";
  }
  </code></pre>
  
  <p>Here's an example on how I declared the instance for a user control. This is in the same format as other user controls.</p>
  
  <pre><code>private static UCCustomer _instance;
  public static UCCustomer Instance
  {
      get
      {
          if (_instance == null)
              _instance = new UCCustomer();
          return _instance;
      }
  }
  </code></pre>