在GridView页脚中显示所选项目的总计 [英] Display selected items total in gridview footer

查看:64
本文介绍了在GridView页脚中显示所选项目的总计的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我将有一个带有复选框和一些金额字段的gridview.我想根据用户选中的项目在gridview页脚中显示金额的总和.有人可以给我提供示例代码吗?

Hi all,

I will have a gridview with checkboxes and some amount fields. I would like to display the sum of the amount in gridview footer depending on the checked items by the user. Can any one give me a sample code

推荐答案

为了谢天谢地,请学习使用搜索引擎.
我只是试着使用您的问题,并获得了很多点击.
For goodness sake learn to use a search engine.

I just tried using your question and got loads and loads of hits.


没有确切的代码!

使用Gridview RowDataBound(或DataGrid的ItemDataBound)事件.在其中,选中复选框值,并基于该值跟踪总计.最后,使用此总计并在需要的地方显示.

试试吧!
No exact code!

Use Gridview RowDataBound (or DataGrid''s ItemDataBound) event. In it, check the checkbox value and based on it keep track of total. At the end, use this total and display where ever needed.

Try!


这篇关于在GridView页脚中显示所选项目的总计的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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