title: DropDownList in Footer Template
body: <p>I need added to the beginning of the <strong>DropDownList DDL</strong> one row empty:</p>
  
  <pre><code>&lt;asp:ListItem Text="------" Value=""&gt;&lt;/asp:ListItem&gt;
  </code></pre>
  
  <p>I've tried using these two different solutions without success.</p>
  
  <p>Here is my code.</p>
  
  <p><strong>Solution #1</strong></p>
  
  <pre><code>&lt;FooterTemplate&gt;
   &lt;asp:DropDownList ID="DDL" runat="server" Font-Bold="true" Font-Size="X-Small"&gt;
      &lt;asp:ListItem Text="------" Value=""&gt;&lt;/asp:ListItem&gt;
    &lt;/asp:DropDownList&gt;
  &lt;/FooterTemplate&gt;
  </code></pre>
  
  <p><strong>Solution #2</strong></p>
  
  <pre><code>if (e.Row.RowType == DataControlRowType.Footer)
  {
      DropDownList DDL = (DropDownList)e.Row.FindControl("DDL");
  
      sql = " SELECT DISTINCT FROM .....; ";
  
      OdbcCommand cmd = new OdbcCommand(sql);
      DDL.DataSource = GetData(cmd);
      DDL.DataTextField = "combo";
      DDL.DataValueField = "combo";
      DDL.DataBind();
      DDL.Items.Add(new ListItem("------", ""));
  }
  </code></pre>