title: Databinding to a reference Table WPF MVVM using Entity Framework
body: <p>I have a Datagrid where I use Databinding. This Datagrid displays documents that need to be printed.I use the Entity Framework.</p>
  
  <pre><code>&lt;Datagrid.Columns&gt;
  &lt;DatagridTextColumn Header"Printed On" Binding="{Binding printed_on, Mode=OneWay,  NotifyOnSourceUpdated=True, NotifyOnTargetUpdated=True,  UpdateSourceTrigger=PropertyChanged, BindsDirectlyToSource=True,  IsAsync=True}" &gt;
  
  &lt;DatagridTextColumn Header"State" Binding="{Binding state1.description,           Mode=OneWay,                        NotifyOnSourceUpdated=True, NotifyOnTargetUpdated=True,UpdateSourceTrigger=PropertyChanged,  BindsDirectlyToSource=True, IsAsync=True}" &gt;
  &lt;/Datagrid.Columns&gt;
  </code></pre>
  
  <p>If I print a document, I set the field printed_on to the actual date, and I set the state to printed, which is an integer in an enumeration. The Field state1.description connects "to be printed" to 0, "printed" to 1 and "error" to 2.</p>
  
  <p>If I update those two values, I can see the actual Date on printed on, but state1.description seems not to change in the datagrid - there is still "open", not "printed"</p>
  
  <p>And I have an other Datagrid, where I show how mutch Documents are already printed and how mutch Documents have to be printed. I have a partial class, that extends the Class that is made by the Entity Framework and returns in a property a count on the documents. But if i change the state of the document, they are not updated too. The Propertys in the class look like</p>
  
  <pre><code>partial public class headers
  public readonly property intStateOpen as integer
  get 
      return from ... count
  end property
  </code></pre>
  
  <p>end class</p>
  
  <p>what should i do?</p>