title: Binding to DataGridView so each cell is a bound object rather than each row
body: <p>I'm trying to set up a DataGridView to represent a page out of a map book.  Each cell in the grid represents a MapGrid object.  Users would use this to set the route for the MapGrids.</p>
  
  <pre><code>public class MapGrid
  {
      public int ID { get; set; }
      public short PageNumber { get; set; }
      public char ColumnNumber { get; set; }
      public byte RowNumber { get; set; }
      public RouteSummary Route { get; set; }
  }  
  
  public class RouteSummary
  {
      public int ID { get; set; }
      public byte RouteNumber { get; set; }
  }
  </code></pre>
  
  <p>I'm wondering if I can use data binding to bind my list of MapGrid objects to the grid.  I would like to do something like this:</p>
  
  <pre><code>List&lt;MapGrid&gt; mapGrids = GetMapGrids();
  dataGridView.DataSource = mapGrids;
  </code></pre>
  
  <p>And I would like the dataGridView to display the <code>MapGrid.RouteSummary.RouteNumber</code> property.</p>
  
  <p>I was thinking maybe I could create an <code>ILookup&lt;byte, MapGrid&gt;</code> to group the MapGrids by row.  Then maybe I could bind that to the DataGridView.  I'm not sure how I would tell it to display the RouteNumber, though.</p>
  
  <p>If the number of columns was constant I could simply create an object with a property for each column and bind a list of those to the DataGridView.  But of course things aren't that simple.  The number of columns is not constant.  So I don't see how that could work.</p>
  
  <p>Any ideas?  Am I trying to do something beyond the scope of data binding?  Right now I'm thinking I'll have to manually populate the DataGridView with my MapGrid objects and use the <code>CellValueChanged</code> event to update stuff.</p>