title: How to cancel changes made through Databinding?
body: <p>I'm passing a list of customers via the constructor. Then it's databound to a ListBox. I've also databound a Textbox to allow changing the name of the customer, it automatically update the ListBox and the customer list, which is really nice.</p>
  
  <p>However, I would like the changes not to be maintained if the user click on the Cancel Button. I'm telling the program to set the list of customers to the old one, but it doesn't work, when I open the window again the ListBox show the updated customer names rather than being the old names.</p>
  
  <pre><code>using System;
  using System.Drawing;
  using System.Windows.Forms;
  using System.Collections.Generic;
  
  namespace Bingding_Test
  {
      public partial class Form_Customers : Form
      {
          List&lt;Customer&gt; customers;
          List&lt;Customer&gt; old_customers;
          BindingSource bs = new BindingSource();
  
          public Form_Actors(List&lt;Customer&gt; _customers)
          {
              InitializeComponent();
  
              customers = _customers;
              old_customers = new List&lt;Customer&gt;(_customers);
  
              bs.DataSource = customers;
              listBox1.DataSource = bs;
              listBox1.DisplayMember = "Name";
  
              txtb_name.DataBindings.Add("Text", bs, "Name");
          }
  
          void Btn_cancelClick(object sender, EventArgs e)
          {
              actors = old_customers;
              this.Close();
          }
  
          void Btn_saveClick(object sender, EventArgs e)
          {
              this.Close();
          }
      }
  }
  </code></pre>
  
  <p>Anyone know what I can do to make sure all the changes aren't saved when I click the cancel button?</p>