如何在grideview中计算 [英] How do I calculate in grideview

查看:88
本文介绍了如何在grideview中计算的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试下订单。当从网格视图的下拉列表中选择代码时,它会自动在标签中显示名称和价格。但是当在数量文本框中给出值时,它不起作用。所有数据都来自不同的表格。我的网格视图看起来像......

I am trying to make an order form. when a code is selected from drop down list in grid view then it automatically show Name and Price in label. But when a value is given in the Quantity text box it does not work. All data come from a different table. My grid view is look like...

<asp:GridView ID="GridView1" runat="server">
    <columns>
         <asp:TemplateField HeaderText="Code" >
             <itemtemplate>
                 <asp:DropDownList ID="ddlCode" runat="server">
             </itemtemplate>                                                                      
          
        <asp:TemplateField HeaderText="Name" >
             <itemtemplate>
                 <asp:Label ID="lblName" runat="server" />    
             </itemtemplate>                                                                      
          
        <asp:TemplateField HeaderText="Price" >
             <itemtemplate>
                 <asp:Label ID="lblPrice" runat="server" />    
             </itemtemplate>                                                                      
          
        <asp:TemplateField HeaderText="Quantity" >
             <itemtemplate>
                 <asp:TextBox ID="txtQuantity" runat="server">
             </itemtemplate>                                                                      
    </columns>



如何计算总计和所有行总数?


How do I calculate Total and all rows Total ?

推荐答案

这些链接应该有所帮助 -

使用jQuery计算ASP.Net GridView中的行总数和总计 [ ^ ]

视频 [ ^ ]

使用JavaScript / JQuery计算GridView总数 [ ^ ]
These links should help -
Calculate Row Total and Grand Total in ASP.Net GridView using jQuery[^]
Video[^]
Calculating GridView total using JavaScript/JQuery[^]


这篇关于如何在grideview中计算的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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