title: Remove ddl's that has no value's
body: <p>I have little problem. I'm dynamically populating grid view from the values from the database. I'm trying to remove DropDownList's that don't have any values.</p>
  
  <p>I have this code for now:</p>
  
  <pre><code>if (ddlMyDropDown.Items.Count == 0)
   {
       ddlMyDropDown = false;
   }
  else
   {
       ddlMyDropDown = true;
   }
  
  &lt;asp:TemplateField HeaderText="Opis"&gt;
                      &lt;ItemTemplate&gt;
  
                           &lt;asp:DropDownList ID="ddlMyDropDown" runat="server"&gt;
                           &lt;/asp:DropDownList&gt;
  
  
                  &lt;/ItemTemplate&gt;
  &lt;/asp:TemplateField&gt;
  </code></pre>
  
  <p>This code works fine but it has one problem. It doesn't remove first ddl in column who is also empty but it removes every other after.
  Is there any way to select first ddl who si dinamically loaded in the column and set it to visible false ?
  Or some foreach loop that eliminates the ddl's with empty value better ?</p>
  
  <p>Can someone help me ?</p>
  
  <p>Thanks in advance !</p>