title: How to access drop down list from EditItemTemplate of FormView
body: <p>I have a formview on my aspx page containing various controls arranged using table.
  There is a DDL "cboClients" which i need to enable or disabled depending upon role within Edit mode.</p>
  
  <p>The problem here is that i am not able to get that control using FindControl() method.</p>
  
  <p>I have tried following code -</p>
  
  <pre><code>     DropDownList ddl = null;
         if (FormView1.Row != null)
          {
              ddl = (DropDownList)FormView1.Row.FindControl("cboClients");
              ddl.Enabled=false;        
  }
  </code></pre>
  
  <p>Even I ave used the DataBound event of the same control -</p>
  
  <pre><code>protected void cboClients_DataBound(object sender, EventArgs e)
      {
          if (FormView1.CurrentMode == FormViewMode.Edit)
          {
              if ((Session["RoleName"].ToString().Equals("Clients")) || (Session["RoleName"].ToString().Equals("Suppliers")))
              {
                  DropDownList ddl = (DropDownList)sender;
                  ddl.Enabled = false;
              }
          }
      }
  </code></pre>
  
  <p>But this databound event occurs only once, but not when formview mode is changed.</p>
  
  <p>Can anyone provide me proper solution?</p>
  
  <p>Thanks for sharing your time.</p>