title: How to bind hovermenuextender control to a row with multiple columns in a dynamic gridview?
body: <p>I wish to attach a hovermenu pop up to rows of a gridview which is dynamically populated from a datasource. I tried to set TargetcontrolId property of hovermenuextender control to row unique Id on occurence of rowdatabound event. But rather than appearing on the right side of each row, pop up is appearing on the right side of header row. Can somebody help me resolve this problem? I used below code for the same</p>
  
  <p>CodeBehind:</p>
  
  <pre><code>protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
  {
      try
      {
          if (e.Row.RowType == DataControlRowType.DataRow)
          {
              HoverMenuExtender hoverMenu =(HoverMenuExtender)e.Row.FindControl("hme2");
              if (hoverMenu != null)
              {
                  hoverMenu.TargetControlID = hoverMenu.Parent.Parent.UniqueID;
  
              } 
          }
      }
  }
  </code></pre>
  
  <p>Aspx page:</p>
  
  <pre><code>&lt;asp:UpdatePanel ID="UpdatePanel1" runat="server"&gt;
    &lt;ContentTemplate&gt;
  
      &lt;asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" BackColor="White" ShowFooter="false" ShowHeader="false"
        OnRowEditing="GridView1_RowEditing" OnRowCommand="GridView1_RowCommand" OnRowUpdating="GridView1_RowUpdating"
        GridLines="None"  OnRowDataBound="GridView1_RowDataBound"&gt;
  
        &lt;AlternatingRowStyle BackColor="White" /&gt;
        &lt;Columns&gt;
          &lt;asp:TemplateField HeaderText ="Talk Title"&gt;
            &lt;ItemTemplate&gt;
              &lt;asp:Label Font-Bold="true" ID="lbltalktitle"  runat="server" Text='&lt;%#Eval("Talk_Title") %&gt;' /&gt;
            &lt;/ItemTemplate&gt;
          &lt;/asp:TemplateField&gt;
  
          &lt;asp:TemplateField HeaderText ="Brand"&gt;
            &lt;ItemTemplate&gt;
              &lt;asp:Label ID="lblBrand" runat="server" Text='&lt;%# Eval("Brand") %&gt;' /&gt;&lt;/td&gt;
            &lt;/ItemTemplate&gt;
          &lt;/asp:TemplateField&gt;
  
          &lt;asp:TemplateField HeaderText ="Franchise"&gt;
            &lt;ItemTemplate&gt;
              &lt;asp:Label ID="lblFranchise" runat="server" Text='&lt;%# Eval("Franchise") %&gt;' /&gt;
            &lt;/ItemTemplate&gt;
          &lt;/asp:TemplateField&gt;
  
          &lt;asp:TemplateField HeaderText ="programmetype"&gt;
            &lt;ItemTemplate&gt;
              &lt;asp:Label ID="lblprg" runat="server" Text='&lt;%# Eval("programmetype") %&gt;' /&gt;
            &lt;/ItemTemplate&gt;
          &lt;/asp:TemplateField&gt;
  
          &lt;asp:TemplateField HeaderText ="programmetype"&gt;
            &lt;ItemTemplate&gt;
              &lt;asp:Label ID="lblsaledforce" runat="server" Text='&lt;%# Eval("salesforce") %&gt;' /&gt;
            &lt;/ItemTemplate&gt;
          &lt;/asp:TemplateField&gt;
  
          &lt;asp:TemplateField HeaderText ="Start_Date"&gt;
            &lt;ItemTemplate&gt;
              &lt;asp:Label ID="lblstartdate" runat="server" Text='&lt;%# Eval("Start_Date") %&gt;' /&gt;
            &lt;/ItemTemplate&gt;
          &lt;/asp:TemplateField&gt;
  
          &lt;asp:TemplateField HeaderText ="End_Date"&gt;
            &lt;ItemTemplate&gt;
              &lt;asp:Label ID="lblenddate" runat="server" Text='&lt;%# Eval("End_Date") %&gt;' /&gt;
            &lt;/ItemTemplate&gt;
          &lt;/asp:TemplateField&gt;
          &lt;asp:TemplateField&gt;
            &lt;ItemTemplate&gt;
              &lt;cc1:HoverMenuExtender ID="hme2" runat="server" TargetControlID="lblenddate"
                PopupControlID="PopupMenuX" HoverCssClass="popupHover" PopupPosition="Right"/&gt;
  
              &lt;asp:Panel CssClass="popupMenu" ID="PopupMenuX" runat="server"&gt;
                &lt;asp:LinkButton ID="LinkButton1" runat="server" CommandName="Edit" Text="Edit" /&gt;&lt;br /&gt;
                &lt;asp:LinkButton ID="LinkButton2" runat="server" CommandName="Delete" Text="Delete" /&gt;
              &lt;/asp:Panel&gt;
            &lt;/ItemTemplate&gt;
          &lt;/asp:TemplateField&gt;
  
        &lt;/Columns&gt;
  
        &lt;FooterStyle BackColor="#C6C3C6" ForeColor="Black" /&gt;
        &lt;HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#E7E7FF" /&gt;
        &lt;PagerStyle BackColor="#C6C3C6" ForeColor="Black" HorizontalAlign="Right" /&gt;
        &lt;RowStyle  ForeColor="Black"  /&gt;
        &lt;SortedAscendingCellStyle BackColor="#F1F1F1" /&gt; 
        &lt;SortedAscendingHeaderStyle BackColor="#594B9C" /&gt;
        &lt;SortedDescendingCellStyle BackColor="#CAC9C9" /&gt;
        &lt;SortedDescendingHeaderStyle BackColor="#33276A" /&gt;
      &lt;/asp:GridView&gt;
  </code></pre>