我有一个gridview,列出尺寸,比如说XS,S,SM,M,L等等。我使用ajax hovermenuextender,这样当用户悬停到每个数量时,会显示一些信息,例如Line Name。我试图为前两个尺寸/列创建ajax并使其正常工作。但是当谈到下一篇专栏文章时,我会遇到一些错误。
这可能吗?我是ajax和ASP Gridview的新手。做这个的最好方式是什么?或者你能告诉我应该改进哪部分编码吗?
<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>