asp.net中的gridview计算 [英] gridview calculation in asp.net

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

问题描述

所有这些都是我的网格页脚计算脚本,如果aspx页是独立的,则此脚本运行良好,当我将同一个脚本与asp.net母版页内容页面一起使用时,该脚本不起作用

这是我的剧本

hi all this is my grid footer calculation script this script is working good if the aspx page is independent , when i use the same script with my asp.net master page content page that script is not working

this is my script

function GrossTotal()
         {
            $("[id*=GridView1]input[type=text][id*=txtCalc]").keyup(function(e) {
                var price = $(this).closest('tr').find("input[type=text][id*=txtCalcPrice]").val();
                var quantity = $(e.target).closest('tr').find("input[type=text][id*=txtCalcQuantity]").val();
                var total = parseInt(price) * parseInt(quantity);
                $(e.target).closest('tr').find("[id*=lblGrossTotal]").text(total);
            });
        }



我需要做哪些更改才能应用此脚本在asp.net的主页内容页面中起作用?



what changes i have to do for apply this script to be work in my master page content page in asp.net

推荐答案

(" ).keyup(function(e){ var 价格=
("[id*=GridView1]input[type=text][id*=txtCalc]").keyup(function(e) { var price =


( this ).closest(' tr').find(" input [type = text] [id * = txtCalcPrice]").val(); var 数量=
(this).closest('tr').find("input[type=text][id*=txtCalcPrice]").val(); var quantity =


(e.target).closest(' tr').find(" ).val(); var total = parseInt(price)* parseInt(quantity);
(e.target).closest('tr').find("input[type=text][id*=txtCalcQuantity]").val(); var total = parseInt(price) * parseInt(quantity);


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

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