如何为网格视图创建页脚和页眉 [英] how create footer and headr for grid view

查看:136
本文介绍了如何为网格视图创建页脚和页眉的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨朋友
如何在网格视图中创建页脚以汇总已提交的gridview

并创建写有标题所有列表用户"的标题.

hi firends
how create footer in grid view that to sum filed gridview

and create header that write up header "all list user"

推荐答案

使用其他控件,例如Label.将它们停靠在父面板的顶部和底部,在中间填充网格视图.更改任何单元格并将新值分配给这些标签的文本时,请重新计算您的值.

—SA
Use some other controls, like Label. Dock them, say, to the top and bottom of the parent panel, fill the grid view in the middle. Re-calculate your values as you change any cell and assign new values to the texts of those labels.

—SA


尝试在.aspx文件中遵循以下代码.


Try following code in your .aspx file.


<asp:gridview id="Griddealers" runat="server" bordercolor="#55A0FF" xmlns:asp="#unknown">
 <columns>
<asp:templatefield headertext="all list user" headerstyle-cssclass="grdheadermster" visible="True">
</asp:templatefield>

<asp:templatefield footertext="sum" headerstyle-cssclass="grdheadermster" visible="True">
 <itemtemplate>
   <asp:label id="lblfid" runat="server" cssclass="labelstyle" text="<%# bind("Sum") %>"></asp:label>
</itemtemplate>
</asp:templatefield>
</columns></asp:gridview>


这篇关于如何为网格视图创建页脚和页眉的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆