title: Displaying Navigation Properties on a GridView using EntityDataSource?
body: <p>I have an EntityDataSource I've mapped to the entity Resident which includes two navigation properties (Building1, Room1). I've set my GridView to use this EntityDataSource and set the EntityDataSource Include property to Building1, Room1 so it includes these navigation properties and have added these columns to the GridView. When I run the application instead of displaying the associated navigation property it shows this: webHousingAdmin.Building
  How can I get it to display the actual value?
  Code looks like this for GridView:</p>
  
  <pre><code>        &lt;asp:TemplateField&gt;
              &lt;ItemTemplate&gt;
                  &lt;asp:Label ID="lbl1" runat="server" Text='&lt;%# Bind("Building1") %&gt;' /&gt;
              &lt;/ItemTemplate&gt;
          &lt;/asp:TemplateField&gt;
  </code></pre>
  
  <p>I've gotten it to display the actual value by using the following code:</p>
  
  <pre><code>            &lt;asp:TemplateField HeaderText="Building"&gt;
              &lt;ItemTemplate&gt;
                  &lt;asp:Label ID="lblBuilding" Text='&lt;%# Bind("Building1.building_name") %&gt;' runat="server" /&gt;
              &lt;/ItemTemplate&gt;
          &lt;/asp:TemplateField&gt;
  </code></pre>
  
  <p>But is there a simpler way to do this? This only displays the text, doesn't let me edit it...if I can do it as a boundfield that would be ideal.</p>