如何使用javascript或jquery在asp.net中乘以GridView列 [英] how to multiply GridView Column in asp.net using javascript or jquery

查看:93
本文介绍了如何使用javascript或jquery在asp.net中乘以GridView列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

<asp:GridView ID="GvOrder" runat="server" AutoGenerateColumns="false">
        <Columns>

               <asp:TemplateField HeaderText = "Item">
                <ItemTemplate>
                    <asp:Label ID="lblItemName" runat="server" Text='<%# Eval("Product_Name")%>' ></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
             <asp:TemplateField HeaderText = "Price">
                <ItemTemplate>
                    <asp:Label ID="lblPrice" runat="server" Text='<%# Eval("Unit_Price")%>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
             <asp:TemplateField HeaderText = "Quantity">
                <ItemTemplate>
                    <asp:TextBox ID="txtQuantity"  onkeyup="return calculate(this)" runat="server"></asp:TextBox>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText = "Total">
                <ItemTemplate>
                    <asp:Label ID="lblTotal" runat="server" Text="0"></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
    </asp:GridView>











项目,价格,总计和格兰特是标签字段和数量在文本框中

当我们输入数量然后总计和总计将立即计算并显示。

当我们擦除数量意味着没有价值那么总和总计将立即0。怎么可能请帮忙。






item,Price,Total and grandtotal are label field and Quantity is in textbox
when we enter quantity then total and grand total will immediately calculate and display.
and when we erase quantity means no value then total and grand total will be immediately 0. how is it possible please help .

推荐答案

在这里下载来源参考并使用它



http://www.aspsnippets.com/Articles /Calculate-Row-Total-and-Grand-Total-in-ASPNet-GridView-using-jQuery.aspx [ ^ ]
Download Source here Refer and use it

http://www.aspsnippets.com/Articles/Calculate-Row-Total-and-Grand-Total-in-ASPNet-GridView-using-jQuery.aspx[^]


这篇关于如何使用javascript或jquery在asp.net中乘以GridView列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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