给GridView加点料:Div动态浮动显示
来源:互联网 发布:陌陌软件 编辑:程序博客网 时间:2024/05/07 20:16
首先看看效果:
鼠标移动到 按钮上面就浮动显示详细信息,下面是实现代码:
用到控件:HoverMenuExtender
<asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False"
CellPadding="4" DataKeyNames="采购单号,行号" DataSourceID="SqlDataSource1" Font-Size="10pt"
ForeColor="#333333" OnRowCommand="GridView1_RowCommand" OnRowDataBound="GridView1_RowDataBound"
PageSize="5" Style="position: static" Width="100%">
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<Columns>
<asp:TemplateField HeaderText="历/详" InsertVisible="False">
<ItemTemplate>
<asp:Panel ID="PanelMenu2" runat="server">
<%...--<asp:ImageButton ID="ImageBtnEdit" runat="server" CommandArgument='<%# Eval("行号")%>'
CommandName="CommandHistory" ImageUrl="~/image07/histrory.gif" />--%>
<a href="hthistory07.aspx?id=<%# Eval("物料")%>" target="_blank">
<img src="image07/histrory.gif" alt="" style="border-width:0px"/>
</a>
</asp:Panel>
<asp:Panel ID="Panel_CGDHangInfo" runat="server" Width="300px">
<div class="notice" style="border:1px outset white; font-size:12px;">
物料代码:<asp:Label ID="lbl_01" runat="server" Text='<%# Bind("物料")%>'></asp:Label>
<br />
物料描述:<asp:Label ID="lbl_02" runat="server" Text='<%# Bind("物料描述")%>'></asp:Label>
<br />
采购数量:<asp:Label ID="lbl_03" runat="server" Text='<%# Bind("采购数量")%>'></asp:Label>
<br />
单价:<asp:Label ID="lbl_04" runat="server" Text='<%# Bind("单价")%>'></asp:Label>
<br />
一次性费用:<asp:Label ID="lbl_05" runat="server" Text='<%# Bind("一次性费用")%>'></asp:Label>
<br />
单位:<asp:Label ID="lbl_06" runat="server" Text='<%# Bind("单位")%>'></asp:Label>
<br />
到货日期:<asp:Label ID="lbl_07" runat="server" Text='<%# Bind("到货日期")%>'></asp:Label>
<br />
合计价格:<asp:Label ID="lbl_08" runat="server" Text='<%# Bind("合计价格")%>'></asp:Label>
<br />
任务号:<asp:Label ID="lbl_09" runat="server" Text='<%# Bind("任务号")%>'></asp:Label>
<br />
定额数:<asp:Label ID="lbl_10" runat="server" Text='<%# Bind("定额数2")%>'></asp:Label>
<br />
备注:<asp:Label ID="lbl_11" runat="server" ForeColor="red" Text='<%# Bind("备注")%>'></asp:Label>
</div>
</asp:Panel>
<ajaxToolkit:HoverMenuExtender ID="hme2" runat="Server" TargetControlID="PanelMenu2" PopupControlID="Panel_CGDHangInfo" HoverCssClass="popupHover" PopupPosition="Right" />
</ItemTemplate>
<HeaderStyle HorizontalAlign="Center" />
</asp:TemplateField>
<asp:BoundField DataField="行号" HeaderText="行号" ReadOnly="True">
<ItemStyle Width="30px" />
</asp:BoundField>
<asp:BoundField DataField="物料" HeaderText="ERP代码">
<ItemStyle Width="90px" />
<HeaderStyle HorizontalAlign="Center" />
</asp:BoundField>
<asp:BoundField DataField="物料描述" HeaderText="物料描述">
<ItemStyle Width="90px" />
<HeaderStyle HorizontalAlign="Center" />
</asp:BoundField>
<asp:BoundField DataField="采购数量" HeaderText="采购数量">
<HeaderStyle HorizontalAlign="Center" />
</asp:BoundField>
<asp:TemplateField HeaderText="单价" InsertVisible="False" >
<ItemTemplate>
<asp:Label ID="Label2" runat="server" Text='<%# Bind("单价")%>'>
</asp:Label><br/>
<asp:Image ID="ImagePrice" runat="server" />
<asp:Label ID="lbl_percent" runat="server">
</asp:Label>
</ItemTemplate>
</asp:TemplateField>
<%...--<asp:BoundField DataField="单价" HeaderText="单价">
<HeaderStyle HorizontalAlign="Center" />
</asp:BoundField>--%>
<asp:BoundField DataField="单价" HeaderText="单价" Visible="false" DataFormatString="{0:f2}">
<HeaderStyle HorizontalAlign="Center" />
</asp:BoundField>
<asp:BoundField DataField="一次性费用" HeaderText="一次费" HtmlEncode="false" DataFormatString="{0:f2}">
<HeaderStyle HorizontalAlign="Center" />
</asp:BoundField>
<asp:BoundField DataField="单位" HeaderText="单位">
<HeaderStyle HorizontalAlign="Center" />
</asp:BoundField>
<asp:BoundField DataField="到货日期" HeaderText="到货日期" HtmlEncode="false" DataFormatString="{0:yyyy-MM-dd}">
<HeaderStyle HorizontalAlign="Center" />
</asp:BoundField>
<asp:BoundField DataField="合计价格" HeaderText="合计价格" HtmlEncode="false" DataFormatString="{0:f2}">
<HeaderStyle HorizontalAlign="Center" />
</asp:BoundField>
<asp:BoundField DataField="任务号" HeaderText="任务号" Visible="false">
<HeaderStyle HorizontalAlign="Center" />
</asp:BoundField>
<asp:BoundField DataField="定额数2" HeaderText="定额数" Visible="false">
<HeaderStyle HorizontalAlign="Center" />
</asp:BoundField>
<asp:BoundField DataField="备注" HeaderText="备注" Visible="false">
<HeaderStyle HorizontalAlign="Center" />
</asp:BoundField>
</Columns>
<EditRowStyle BackColor="#2461BF" />
<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
<PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Left" />
<HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<AlternatingRowStyle BackColor="White" />
</asp:GridView>
CellPadding="4" DataKeyNames="采购单号,行号" DataSourceID="SqlDataSource1" Font-Size="10pt"
ForeColor="#333333" OnRowCommand="GridView1_RowCommand" OnRowDataBound="GridView1_RowDataBound"
PageSize="5" Style="position: static" Width="100%">
<FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<Columns>
<asp:TemplateField HeaderText="历/详" InsertVisible="False">
<ItemTemplate>
<asp:Panel ID="PanelMenu2" runat="server">
<%...--<asp:ImageButton ID="ImageBtnEdit" runat="server" CommandArgument='<%# Eval("行号")%>'
CommandName="CommandHistory" ImageUrl="~/image07/histrory.gif" />--%>
<a href="hthistory07.aspx?id=<%# Eval("物料")%>" target="_blank">
<img src="image07/histrory.gif" alt="" style="border-width:0px"/>
</a>
</asp:Panel>
<asp:Panel ID="Panel_CGDHangInfo" runat="server" Width="300px">
<div class="notice" style="border:1px outset white; font-size:12px;">
物料代码:<asp:Label ID="lbl_01" runat="server" Text='<%# Bind("物料")%>'></asp:Label>
<br />
物料描述:<asp:Label ID="lbl_02" runat="server" Text='<%# Bind("物料描述")%>'></asp:Label>
<br />
采购数量:<asp:Label ID="lbl_03" runat="server" Text='<%# Bind("采购数量")%>'></asp:Label>
<br />
单价:<asp:Label ID="lbl_04" runat="server" Text='<%# Bind("单价")%>'></asp:Label>
<br />
一次性费用:<asp:Label ID="lbl_05" runat="server" Text='<%# Bind("一次性费用")%>'></asp:Label>
<br />
单位:<asp:Label ID="lbl_06" runat="server" Text='<%# Bind("单位")%>'></asp:Label>
<br />
到货日期:<asp:Label ID="lbl_07" runat="server" Text='<%# Bind("到货日期")%>'></asp:Label>
<br />
合计价格:<asp:Label ID="lbl_08" runat="server" Text='<%# Bind("合计价格")%>'></asp:Label>
<br />
任务号:<asp:Label ID="lbl_09" runat="server" Text='<%# Bind("任务号")%>'></asp:Label>
<br />
定额数:<asp:Label ID="lbl_10" runat="server" Text='<%# Bind("定额数2")%>'></asp:Label>
<br />
备注:<asp:Label ID="lbl_11" runat="server" ForeColor="red" Text='<%# Bind("备注")%>'></asp:Label>
</div>
</asp:Panel>
<ajaxToolkit:HoverMenuExtender ID="hme2" runat="Server" TargetControlID="PanelMenu2" PopupControlID="Panel_CGDHangInfo" HoverCssClass="popupHover" PopupPosition="Right" />
</ItemTemplate>
<HeaderStyle HorizontalAlign="Center" />
</asp:TemplateField>
<asp:BoundField DataField="行号" HeaderText="行号" ReadOnly="True">
<ItemStyle Width="30px" />
</asp:BoundField>
<asp:BoundField DataField="物料" HeaderText="ERP代码">
<ItemStyle Width="90px" />
<HeaderStyle HorizontalAlign="Center" />
</asp:BoundField>
<asp:BoundField DataField="物料描述" HeaderText="物料描述">
<ItemStyle Width="90px" />
<HeaderStyle HorizontalAlign="Center" />
</asp:BoundField>
<asp:BoundField DataField="采购数量" HeaderText="采购数量">
<HeaderStyle HorizontalAlign="Center" />
</asp:BoundField>
<asp:TemplateField HeaderText="单价" InsertVisible="False" >
<ItemTemplate>
<asp:Label ID="Label2" runat="server" Text='<%# Bind("单价")%>'>
</asp:Label><br/>
<asp:Image ID="ImagePrice" runat="server" />
<asp:Label ID="lbl_percent" runat="server">
</asp:Label>
</ItemTemplate>
</asp:TemplateField>
<%...--<asp:BoundField DataField="单价" HeaderText="单价">
<HeaderStyle HorizontalAlign="Center" />
</asp:BoundField>--%>
<asp:BoundField DataField="单价" HeaderText="单价" Visible="false" DataFormatString="{0:f2}">
<HeaderStyle HorizontalAlign="Center" />
</asp:BoundField>
<asp:BoundField DataField="一次性费用" HeaderText="一次费" HtmlEncode="false" DataFormatString="{0:f2}">
<HeaderStyle HorizontalAlign="Center" />
</asp:BoundField>
<asp:BoundField DataField="单位" HeaderText="单位">
<HeaderStyle HorizontalAlign="Center" />
</asp:BoundField>
<asp:BoundField DataField="到货日期" HeaderText="到货日期" HtmlEncode="false" DataFormatString="{0:yyyy-MM-dd}">
<HeaderStyle HorizontalAlign="Center" />
</asp:BoundField>
<asp:BoundField DataField="合计价格" HeaderText="合计价格" HtmlEncode="false" DataFormatString="{0:f2}">
<HeaderStyle HorizontalAlign="Center" />
</asp:BoundField>
<asp:BoundField DataField="任务号" HeaderText="任务号" Visible="false">
<HeaderStyle HorizontalAlign="Center" />
</asp:BoundField>
<asp:BoundField DataField="定额数2" HeaderText="定额数" Visible="false">
<HeaderStyle HorizontalAlign="Center" />
</asp:BoundField>
<asp:BoundField DataField="备注" HeaderText="备注" Visible="false">
<HeaderStyle HorizontalAlign="Center" />
</asp:BoundField>
</Columns>
<EditRowStyle BackColor="#2461BF" />
<SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
<PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Left" />
<HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
<AlternatingRowStyle BackColor="White" />
</asp:GridView>
- 给GridView加点料:Div动态浮动显示
- 给Xcode加点料
- GridView鼠标移上某行显示浮动DIV提示信息
- 给洗脸水加点料改善肌肤
- 使用IronPython给.Net程序加点料
- angulr概念--给技术加点料
- 给AFN加点Cookie
- gridview动态显示数据
- 给生活加点料——Java情书
- 给MapGuide Open Source的ToolTip加点料
- 给千篇一律的注释加点料(ASCII ART)
- App今日免费:给手指加点料Live Fingers
- 【转载】使用IronPython给.Net程序加点料
- 浮动的div层置顶显示
- 给tcpdump加点颜色看看
- iOS 给模糊加点动画
- 让多个div显示在一行(浮动的div)
- 给div动态添加样式
- ORA-00942:table or view does not exist
- .Net Treeview Checkboxes - Check All 功能
- 几大ERP软件实施方法与过程 (转)
- 如何启动或关闭数据库的归档(ARCHIVELOG)模式
- 如何杜绝iframe挂马
- 给GridView加点料:Div动态浮动显示
- translation
- 安装VMware Workstation
- ASP.NET2.0 Ajax的简单配置与应用
- 异端辩解
- linux
- 项目在市场上有大量竞争对手
- 采用Oracle Archive Log模式和非Archive Log模式对备份恢复的影响
- 平淡生活:天大的决定