显示GridView列的总和 [英] Show sum of GridView columns

查看:93
本文介绍了显示GridView列的总和的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请帮助我在gridview中显示列的值,以便在Gridview之外的文本框/标签中显示总值.

请帮助....

Kindly help me to show value of colums in gridview such that it displays the total values in textboxes/lables outside the Gridview.

Plzz help ....

推荐答案

循环处理网格中的每个记录,并调用您要为其计算总计并将其求和的值fo字段
Loop throgh each record in grid and atke the value fo field for which u want to calulate total and sum it


使用Gridview的RowDataBound 事件.

您将可以访问此处的行.在此处汇总列值,并在完成所有列之后,在位于网格下方某处的文本框/标签中显示总和.
Use RowDataBound event of Gridview.

You will have access to the rows here. Sum the column values here and after all columns are done, show the sum in a textbox/label placed somehwere below grid.


这篇关于显示GridView列的总和的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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