title: event handler results not displayed
body: <p>I am dynamically loading a user control. I have added an event handler which is firing and returning the correct result when debugged. However, I am filling the grid from the obtained results. Eventhough i am getting the result and the gridview is filled(as the debugging shows). But the filled gridview is not displayed instead the gridview is as it is. I don't where the error is.</p>
  
  <pre><code>  protected void Page_Load(object sender, EventArgs e)
          {
              lblMessage.Visible = false;
              UCAdvancedFilter.sendMessageToThePage += new AdvancedFilter.SendMessageToThePageHandler(OnsendMessageToThePage);
      }
  </code></pre>
  
  <p>Code behind</p>
  
  <pre><code>  protected void OnsendMessageToThePage(string id)
      {
          GroupMasterClass gm = new GroupMasterClass();
          gm.igroup_id = Convert.ToInt32(id);
  
           ResultClass objres = gm.fn_GetAdvancedSearchById();
           if (objres.bStatus)
           {
               eslist&lt;GroupMasterClass&gt; OBJLIST = objres.objData as eslist&lt;GroupMasterClass&gt;;
               if (OBJLIST.Count &gt; 0)
               {
                grid.DataSource=OBJLIST;
                grid.DataBind();
               }
            }
        }
  </code></pre>
  
  <p>User control</p>
  
  <pre><code>public delegate void SendMessageToThePageHandler(string messageToThePage);
  public event SendMessageToThePageHandler sendMessageToThePage;
  
  #region Events
  
  
      protected void btnCloseMsg_Click(object sender, EventArgs e)
      {
          Panel1_ModalPopupExtender.Hide();
      }
  
      protected void btnSearch_Click(object sender,EventArgs e)
      {
  if (sendMessageToThePage != null)
          {
              sendMessageToThePage(hdnResult.Value);
          }
  }
  </code></pre>
  
  <p>On further debugging and checking I found out that the results are displayed when I click the button once more.</p>
  
  <p>Thanks</p>