title: Entity Framework 4 Binding a related field to a DataGridView column
body: <p>I have a DataGridView that is bound - via a binding source - to a list of entities:</p>
  
  <p>VehicleRepository:</p>
  
  <pre><code>private IObjectSet&lt;Vehicles&gt; _objectSet;
  
  public VehicleRepository(VPEntities context)
  {
      _context = context;
      _objectSet = context.Vehicles;              
  }
  
  List&lt;Vehicle&gt; IVehicleRepository.GetVehicles(Model model)
  {
      return _objectSet
          .Where(e =&gt; e.ModelId == model.ModelId)
          .ToList();                
  }
  </code></pre>
  
  <p>In my presenter</p>
  
  <pre><code>private List&lt;Vehicle&gt; _vehicles;
  ...
  _vehicles = _vehicleRepository.GetVehicles(_model);
  _screen.BindTo(_vehicles);
  </code></pre>
  
  <p>in my view</p>
  
  <pre><code>public void BindTo(List&lt;Vehicle&gt; vehicles)
  {
      _vehicles = vehicles;
      if (_vehicles != null)
      {
          VehicleBindingSource.DataSource = _vehicles;
      }
  }
  </code></pre>
  
  <p>This works fine - my grid displays the data as it should.  However, in the grid I am wanting to replace the ModelId column with a description field from the Model table.  I've tried changing the binding for the column from ModelId to Model.ModelDescription but the column just appears blank.</p>
  
  <p>I'm pretty sure that the data is being loaded, as I can see it when I debug, and when the same list is passed to a details screen I can successfully bind the related data to text fields and see the data.</p>
  
  <p>Am I doing something obviously wrong?</p>