title: Devexpress GridControl Master-detail with Entity Framework: How to set
body: <p>I am trying to show data from two related entities in Devexpress masted-detail grid control</p>
  
  <pre><code>public class ParentTable
      {
        public int ParentID { get; set; }
        public string ParentData1 { get; set; }
        public string ParentData2 { get; set; }
        public virtual ICollection&lt;ChildTable&gt; ChildDataCollection { get; set; }
  
      }
  
  public class ChildTable
      {
        public int ChildID { get; set; }
        public int ParentID { get; set; }
        public string ChildData1 { get; set; }
        public string ChildData2 { get; set; }
      }
  </code></pre>
  
  <p>Describe relation using Fluen API:</p>
  
  <pre><code>   modelBuilder.Entity&lt;ParentTable&gt;()
                  .HasKey(e=&gt; e.ParentID)
                  .HasMany(e =&gt; e.ChildDataCollection)
                  .WithRequired()
                  .HasForeignKey(e =&gt; e.ParentID });
  </code></pre>
  
  <p>ParentList is data from ParentTable and ChildList is from ChildDataCollection</p>
  
  <p>Xaml: </p>
  
  <pre><code>&lt;dxg:GridControl
    AutoPopulateColumns="True"
    CurrentItem="{Binding CurrentParentItem, UpdateSourceTrigger=PropertyChanged}"
    ItemsSource="{Binding Path=ParentList}"&gt;
      &lt;dxg:GridControl.DetailDescriptor&gt;
       &lt;dxg:DataControlDetailDescriptor ItemsSourceBinding="{Binding ChildDataCollection}"&gt;
       &lt;/dxg:DataControlDetailDescriptor&gt;
      &lt;/dxg:GridControl.DetailDescriptor&gt;
     &lt;/dxg:GridControl&gt;
  </code></pre>
  
  <p>If I set DataControlDetailDescriptor Item Source is ChildDataCollection everything is ok, but what to do if I need to modify this collection (I am creating a list according to these data and want to bind it to DataControlDetailDescriptor ItemSource) </p>
  
  <p>I need ChildList would be detail ItemSource and I am not lucky... emty rows :(
  I need this new ChildDataList </p>