title: Binding a List of Lists to a dataGridView
body: <p>I have defined a List (called blockList) which <code>contains 3 objects</code> of Type List (called rowList) which contains 2 objects of Type Record.
  In a dataGridView I want to display one of the <code>3 blocks</code> at one time i.e. a <code>2 x 2 Array.</code></p>
  
  <p>The display of the block should be controlled by a numericalUpDown Control.</p>
  
  <p>When only <code>bs.CurrencyManager.Position</code> is changed in <code>numUpDown_ValueChanged</code> the dataGridView will not be updated as I expected. This is done only if the second line in this method is uncommented.
  One additional problem is that the last line in dataGridview which <code>allows adding of new lines disappears</code>. Setting the <code>allowNew-Property</code> did not help.</p>
  
  <p>I do have the dim feeling that my hole approach how I implemented data binding is not OK.</p>
  
  <p><strong>My code:</strong></p>
  
  <pre><code> public partial class Form1 : Form
  {
      public List&lt;Record&gt; rowList;
      public List&lt;List&lt;Record&gt;&gt; blockList;
  
      public BindingSource bs = new BindingSource();
  
      public Form1()
      {
          InitializeComponent();
  
          int rowListLength = 2;
          int blockListLength = 3;
          blockList = new List&lt;List&lt;Record&gt;&gt;(blockListLength);
          for (int i = 0; i &lt; blockListLength; i++)
          {
              blockList.Add(new List&lt;Record&gt;());
              blockList[i] = new List&lt;Record&gt;(rowListLength);
              for (int j = 0; j &lt; rowListLength; j++)
                  blockList[i].Add(new Record(10 * i + j, "name_" + (10 * i + j).ToString()));
          }
  
          dg.AutoGenerateColumns = false;
          dg.Columns["ID"].ReadOnly = false;
          dg.Columns["ID"].DataPropertyName = "ID";
          dg.Columns["Customer"].DataPropertyName = "Customer";
  
          bs.DataSource = typeof(List&lt;List&lt;Record&gt;&gt;);
          foreach (List&lt;Record&gt; block in blockList)
              bs.Add(block);
          bs.CurrencyManager.Position = 0;
          dg.DataSource = (List&lt;Record&gt;)bs.CurrencyManager.Current;
      }
  
      private void numUpDown_ValueChanged(object sender, EventArgs e)
      {
          bs.CurrencyManager.Position = (int)numUpDown.Value;
          //dg.DataSource = (List&lt;Record&gt;)bs.CurrencyManager.Current;
      }
  }
  
  public class Record
  {
      public Record(int id, string customer)
      {
          ID = id;
          Customer = customer;
      }
      public Decimal? ID { get; set; }       
      public string Customer { get; set; }
  } 
  </code></pre>