title: ASP.NET AJAX issues when using UserControls
body: <p>I Have a UserControl called TenantList.ascx which contains a slightly modified GridView from DevExpress (Web.ASPxGridView). This control makes Callbacks without causing a postback which is exactly what I need.
  The specific event I need to react on is CustomButtonClicked. I have made my on OnCustomButtonClicked event on the usercontrol TenantList.ascx that fires when the the GridView CustomButtonClicked event fires.</p>
  
  <p>I have an eventhandler on the page where I use the UC. When I debug using VS I can see that I get into the eventhandler as I am suppose to.
  My Eventhandler looks like this:</p>
  
  <pre><code>    protected void uc_TenantList_CustomButtonCallback(object sender, ASPxGridViewCustomButtonCallbackEventArgs e)
      {
          Tenant tenant = (Tenant)uc_TenantList.GetGridView().GetRow(e.VisibleIndex);
  
          switch (e.ButtonID)
          {
              case "btn_show":
                  ShowRow(tenant);
                  break;
              case "btn_edit":
                  EditRow(tenant);
                  break;
              case "btn_delete":
                  DeleteRow(tenant.Id);
                  break;
              default:
                  break;
          } 
      }
  
      private void EditRow(Tenant tenant)
      {
          uc_TenantDetails.SetTenantData(cBLL.GetTenant(tenant.Id));
          UpdatePanel1.Update();
      }
  </code></pre>
  
  <p>The EditRow function get's called and the UserControl TenantDetails.ascx gets filled with data correctly. However the UpdatePanel1.Update(); is not updating the panel where my TenantDetails UserControl is in.</p>
  
  <p>However if i call UpdatePanel1.Update(); from a normal control registered to the ScriptManager it updates just fine.</p>
  
  <pre><code>        protected void Button1_Click(object sender, EventArgs e)
          {
              uc_TenantDetails.SetTenantData(cBLL.GetTenant(17));
              UpdatePanel1.Update();
          }
  </code></pre>
  
  <p>That works without a problem... I am 100% stuck and without any idea of what might be the problem here.</p>
  
  <p>Any suggestion is welcome!!</p>
  
  <p>Cheers
  The Real Napster - In real trouble :)</p>