title: c# ItemDataBound new event handler
body: <pre><code>    protected virtual void DataGrid1_ItemDataBound(object sender, DataGridItemEventArgs e)
      {
        this.list = (DropDownList)e.Item.FindControl("edit_list");
        if (list != null)
        {
           list.SelectedIndexChanged += new EventHandler(List_SelectedIndexChanged);
         }     
      }
  </code></pre>
  
  <p>List is assigned, but selectedIndex eventHandler won't work
  if i make <code>RepairsStateList.BackColor = Color.Black;</code> it is working</p>
  
  <pre><code>protected void List_SelectedIndexChanged(object source, System.EventArgs e)
  {
      Response.Write("&lt;script&gt;alert('vv') &lt;/script&gt;");
  }
  </code></pre>