我有一个具有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中的总数?
发布评论