title: Dropdownlist in gridview not firing selectedindex changed event
body: <p>I have problem with not firing selected index changed event of dropdownlist in gridview. I gone through the <a href="https://stackoverflow.com/questions/485390/why-isnt-the-selectedindexchanged-event-firing-from-a-dropdownlist-in-a-gridvie">SO Thread</a> . It is not worked wholly for me. I have implementation like below.</p>
  
  <p><strong>.ASPX</strong></p>
  
  <pre><code>&lt;asp:DropDownList ID="DDL1" runat="server" AutoPostBack="true"   OnSelectedIndexChanged="DDL1_SelectedIndexChanged"&gt;
    &lt;asp:ListItem Text="Review" Value="Review" Selected="True"&gt;Review&lt;/asp:ListItem&gt;
    &lt;asp:ListItem Text="Level1" Value="lvl1"&gt;Send Back to Level1&lt;/asp:ListItem&gt;
  &lt;/asp:DropDownList&gt;
  </code></pre>
  
  <p><strong>.CS</strong></p>
  
  <pre><code>protected void Page_Load(object sender, EventArgs e)
    {
     if(!Page.IsPostBack)
    {
      // Bind the GridView to something.
         DataBindGrid();
    }
   else {
      // Bind the GridView again to maintain previous entered data in the gridview
         DataBindGrid();
    }
    }
  
    protected void DDL1_SelectedIndexChanged(object sender, EventArgs e)
    {
        this.lblCity.Text = ((DropDownList)sender).SelectedValue;
    }
  
  protected void grdPoll_RowDataBound(object sender, GridViewRowEventArgs e)
  {
    if(Page.IsPostBack)
    {
      if(e.Row.RowType == DataControlRowType.DataRow)
      {
        DropDownList ddl = e.Row.FindControl("DDL1") as DropDownList;
        if(ddl != null)
        {
          ddl.SelectedIndexChanged += new EventHandler(DDL1_SelectedIndexChanged);
        }
      }
    }
  }
  </code></pre>
  
  <p>When i keep  <code>if(!Page.IsPostBack)</code> block only then it works fine. But i want <code>else</code> block also.  Whats going wrong with implentation. Can you please suggest the solutions</p>