title: DetailsView control not showing up after DataBind()
body: <p>I have the following detailsview in my asp.net web application.  What it should show is a string with an edit link under, when the edit link is selected then the string turns into a dropdown list that is populated with some options.  When there is no data in the Enumerable the DetailsView does not show up (not even the edit link)...   </p>
  
  <pre><code> &lt;asp:DetailsView ID="dvAwardType" 
              runat="server" 
              AutoGenerateRows="False" 
              Width="100%"
              SkinID="SampleDetailsView" 
              CssSelectorClass="PrettyDetailsView" 
              AutoGenerateEditButton="True" DataKeyNames="guidRequirementId"
              OnModeChanging="dvAwardType_ModeChanging"
              OnItemUpdating="dvAwardType_ItemUpdating"&gt;
              &lt;FieldHeaderStyle Font-Bold="True" Width="150px" /&gt;
              &lt;Fields&gt;
                  &lt;asp:TemplateField HeaderText="Pool Type"&gt;
                      &lt;ItemTemplate&gt;
                          &lt;%#Eval("strAwardType")%&gt;
                      &lt;/ItemTemplate&gt;
                      &lt;EditItemTemplate&gt;
                              &lt;asp:DropDownList ID="ddlAwardType" 
                                  runat="server"&gt;
                              &lt;asp:ListItem Text="" Value="" /&gt;
                              &lt;asp:ListItem Text="Small Business" Value="SB" /&gt;
                              &lt;asp:ListItem Text="Large Business" Value="LB" /&gt;
                          &lt;/asp:DropDownList&gt;
                      &lt;/EditItemTemplate&gt;
                  &lt;/asp:TemplateField&gt;
              &lt;/Fields&gt;
          &lt;/asp:DetailsView&gt;
  
  
   protected void Page_Load(object sender, EventArgs e)
  {
  
      dvAwardType.DataSource = GetData(RequirementId);
      dvAwardType.DataBind();
  }
  
  private IEnumerable GetData(Guid guidRequirementId)
  {
      var data = Requirement.BusinessSize(guidRequirementId)
          .Select(o =&gt;
              new
              {
                  guidRequirementId = o.guidRequirementId,
                  strAwardType = (o.strBusinessSize != null) ? TranslateSize(o.strBusinessSize) : ""
              }
              );
      return data;
  }
  
  private string TranslateSize(string strSize)
  {
      string strTranslated = string.Empty;
      switch(strSize.Trim())
      {
          case "SB": strTranslated = "Small Business";
              break;
          case "LB": strTranslated = "Large Business";
              break;
      }
      return strTranslated;
  }
  </code></pre>