0

I have a gridview which list out sizes let say XS, S, SM, M, L and so on with their quantity. I use ajax hovermenuextender so that when user hover to each quantity, there are some information displayed such as Line Name. I've tried to create the ajax for the first two size/column and its working. But when it comes to the next column, I face some error.

Is this possible? I am quite new to ajax and ASP Gridview. What is the best way to do this? Or can you suggest me which part of the coding that should I improve?

<div style="overflow-x:auto; HEIGHT: 500px" >   
  <asp:GridView ID="GridView1" runat="server"  AutoGenerateColumns ="False" 
   OnRowDataBound="GridView1_RowDataBound" CssClass="stdtable"
   OnRowCreated="GridView1_RowCreated">
    <AlternatingRowStyle BackColor="#ccffcc" BorderStyle="Solid"/> 

   <Columns>
      <asp:TemplateField HeaderText="XXS">
       <ItemTemplate>
         <asp:Label ID="XXS_P" runat="server" Text='<%# Eval("XXS_P") %>' />
          <asp:Panel ID="panel_XXS_P" runat="server" BackColor="AliceBlue">
            Line: <asp:Label ID="lblLineName" runat="server" Text='<%# 
             Eval("LineName") %>' /></td>                                                         
          </asp:Panel>     
          <asp:HoverMenuExtender ID="HoverMenuExtender1" runat="server" 
            TargetControlID="XXS_P"                                                     
            PopupControlID="panel_XXS_P" PopupPosition="Right" 
            PopDelay="20">
          </asp:HoverMenuExtender>  
         </ItemTemplate> <ItemStyle Width="30px" />
      </asp:TemplateField>

    <asp:TemplateField HeaderText="XS">
     <ItemTemplate>
        <asp:Label ID="XS_P" runat="server" Text='<%# Eval("XS_P") %>' />
        <asp:Panel ID="panel_XS_P" runat="server" BackColor="AliceBlue">
         Line: <asp:Label ID="lblLineName" runat="server" Text='<%# 
         Eval("LineName") %>' /></td>                                     
       </asp:Panel>     
        <asp:HoverMenuExtender ID="HoverMenuExtender2" runat="server" 
         TargetControlID="XS_P"                                                        
        PopupControlID="panel_XS_P" PopupPosition="Right" PopDelay="20">
        </asp:HoverMenuExtender>  
       </ItemTemplate> <ItemStyle Width="30px" />
    </asp:TemplateField>

  <asp:TemplateField HeaderText="S">
     <ItemTemplate><asp:Label ID="S_P" runat="server" Text='<%# Eval("S_P") 
       %>' />
        <asp:Panel ID="panel_S_P" runat="server" BackColor="AliceBlue">
        Line: <asp:Label ID="lblLineName" runat="server" Text='<%# 
         Eval("LineName") %>' /></td></asp:Panel>
       <asp:HoverMenuExtender ID="HoverMenuExtender3" runat="server" 
       TargetControlID="S_P" PopupControlID="panel_S_P" 
        PopupPosition="Right" PopDelay="20">
      </asp:HoverMenuExtender></ItemTemplate> <ItemStyle Width="30px" />
   </asp:TemplateField>
  </Columns>
 </asp:GridView>
</div>

Error found when I try to run the application: enter image description here

Alex
  • 4,885
  • 3
  • 19
  • 39
  • Not sure what went wrong here. I could run this example without errors: https://drive.google.com/file/d/12GWjinR7551H51aepYbooZ-O2G0sVC4r/view?usp=sharing – MikhailTymchukDX Dec 25 '17 at 10:19
  • Hi @MikhailTymchukDX, thanks man. Tried yours and its working for me. But I am not sure whats wrong with mine. However the point is, we can use this toolkit for each column right. I should do extra checking on this. Phewh, thanks again. – Bella Shirota Dec 26 '17 at 01:31

0 Answers0