如何计算GridView中的总数?

编程入门 行业动态 更新时间:2024-10-28 13:15:52
本文介绍了如何计算GridView中的总数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个具有5列的gridview(Gridview1),如下所示: 1.第一列是数据绑定的.它绑定到SQL Server客户表的"CustomerID"列; 2.第二列是数据绑定的.它绑定到SQL Server客户表的"CustomerName"列; 3.第三列是数据绑定的.它绑定到SQL Server客户表的"ProductID"列; 4.第4列是ItemTamplate.它绑定到SQL Server客户表的"UnitPrice"列.此列包含ItemTamplate内的TexBox(unitPriceTextBox)控件; 5.第五列是ItemTamplate.它绑定到SQL Server客户表的"DiscountPercentage"列.此列包含ItemTamplate内的TexBox(discountPercentageTextBox)控件; 6.第六列是ItemTamplate.它不绑定到任何SQL Server表.但是必须包含该行的总值.此列在ItemTamplate内包含TexBox(totalWithVTATextBox)控件; 现在,我只需要在第1页加载时以及甚至在用户更改了列单元(如更改单位价格或删除特定行)时,以英尺标签(unitPriceTotalLabel)计算总单位价格. 我也想知道如何计算每行的总数,这是:VTA的单位价格. 感谢您的帮助.

I have a gridview(Gridview1) that has 5 columns as below: 1. The 1st column is databound. It binds to a "CustomerID" column of SQL Server customers table; 2. The 2nd column is databound. It binds to a "CustomerName" column of SQL Server customers table; 3. The 3rd column is databound. It binds to a "ProductID" column of SQL Server customers table; 4. The 4th column is an ItemTamplate. It binds to a "UnitPrice" column of SQL Server customers table.This column contains TexBox (unitPriceTextBox) control inside ItemTamplate; 5. The 5th column is an ItemTamplate. It binds to a "DiscountPercentage" column of SQL Server customers table.This column contains TexBox (discountPercentageTextBox) control inside ItemTamplate; 6. The 6th column is an ItemTamplate. It does not bind to any SQL Server table. But has to contain the total value of the row. This column contains TexBox (totalWithVTATextBox) control inside ItemTamplate; ALL I NEED TO NOW IS HOW TO CALCULATE THE TOTAL UNIT PRICE IN A FOOTER LABEL (unitPriceTotalLabel) WHEN THE PAGE 1st LOADS AND EVEN WHEN THE USER MAKE CHANGES TO A COLUMN CELL LIKE CHANGING UNIT PRICE OR DELETING A SPECIFIC ROW. I ALSO WANT TO KNOW HOW TO CALCULATE THE TOTAL IN EACH ROW, THIS IS: THE UNIT PRICE WITH VTA. I appreciate any help.

推荐答案

外观 www.google.nl/search?hl=nl&q=asp+gridview+calculate+totals [ ^ ].这是2秒钟的Google搜索. look www.google.nl/search?hl=nl&q=asp+gridview+calculate+totals[^].It was 2 seconde Google search.

更多推荐

如何计算GridView中的总数?

本文发布于:2023-10-14 19:14:11,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1491959.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:总数   GridView

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!